mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	Use time.time() instead of time.millitimer()
This commit is contained in:
		
							parent
							
								
									d9193c67d6
								
							
						
					
					
						commit
						e69d3fec87
					
				
					 3 changed files with 11 additions and 11 deletions
				
			
		|  | @ -6,17 +6,17 @@ | |||
| def TSTART(): | ||||
| 	global t0, t1 | ||||
| 	u, s, cu, cs = os.times() | ||||
| 	t0 = u+cu, s+cs, time.millitimer() | ||||
| 	t0 = u+cu, s+cs, time.time() | ||||
| 
 | ||||
| def TSTOP(*label): | ||||
| 	global t0, t1 | ||||
| 	u, s, cu, cs = os.times() | ||||
| 	t1 = u+cu, s+cs, time.millitimer() | ||||
| 	t1 = u+cu, s+cs, time.time() | ||||
| 	tt = [] | ||||
| 	for i in range(3): | ||||
| 		tt.append(t1[i] - t0[i]) | ||||
| 	[u, s, r] = tt | ||||
| 	msg = '' | ||||
| 	for x in label: msg = msg + (x + ' ') | ||||
| 	msg = msg + `u` + ' user, ' + `s` + ' sys, ' + `r*0.001` + ' real\n' | ||||
| 	msg = msg + `u` + ' user, ' + `s` + ' sys, ' + `r` + ' real\n' | ||||
| 	sys.stderr.write(msg) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Guido van Rossum
						Guido van Rossum