Oops. My example should read...

>>current-time: now/time
== 18:20:44.053331911-5:00

Then you have your milliseconds, microseconds, and nanoseconds as 
follows:

>>print current-time/second
44

>>print current-time/millisecond
53

>>print current-time/microsecond
331

>>print current-time/nanosecond
911

> For example, you call 'c from the expression when 'c = 2000. Perhaps the
> average number of counts during the previous 10 seconds was 37,501 counts
> per second. Then the fraction would be .053331 seconds. REBOL could return
> a special 'now of
> 
> >> now
> == 19-Jun-2000/18:20:44.053331-5:00
> 
> or
> 
> >> current-time: now/time
> == 18:20:44.053331-5:00
> 
> Then you have your milliseconds, microseconds, and nanoseconds as 
> follows:
> 
> >> print current-time/second
> 44
> >> print current-time/millisecond
> 5
> >> print current-time/microsecond
> 33
> >> print current-time/nanosecond
> 31
> 
> Of course, this is a very imprecise way of measuring sub-second intervals
> in REBOL.
> 
> Any suggestions on how this might be implemented?
> 
> -Ryan
> 


Reply via email to