Message10378
What if we just get the java.lang.System.nanoTime() into a variable whenever jython starts and hybridize the call to datetime?
Something similar to this solution in Java...
/**
* From http://stackoverflow.com/questions/1712205/current-time-in-microseconds-in-java
* Class to generate timestamps with microsecond precision
* For example: MicroTimestamp.INSTANCE.get() = "2012-10-21 19:13:45.267128"
*/
public enum MicroTimestamp
{ INSTANCE ;
private long startDate ;
private long startNanoseconds ;
private SimpleDateFormat dateFormat ;
private MicroTimestamp()
{ this.startDate = System.currentTimeMillis() ;
this.startNanoseconds = System.nanoTime() ;
this.dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS") ;
}
public String get()
{ long microSeconds = (System.nanoTime() - this.startNanoseconds) / 1000 ;
long date = this.startDate + (microSeconds/1000) ;
return this.dateFormat.format(date) + String.format("%03d", microSeconds % 1000) ;
}
} |
|
Date |
User |
Action |
Args |
2015-10-24 01:43:08 | DanglingPointer | set | messageid: <1445650988.62.0.21372033782.issue2411@psf.upfronthosting.co.za> |
2015-10-24 01:43:08 | DanglingPointer | set | recipients:
+ DanglingPointer, zyasoft |
2015-10-24 01:43:08 | DanglingPointer | link | issue2411 messages |
2015-10-24 01:43:07 | DanglingPointer | create | |
|