getting the precise clock time

getting the precise clock time

PostPosted by drab » Thu Oct 09, 2014 11:48 am

In order to accurately measure the performance of anything, there has to be a simple way to obtain the precise clock time.

Quad-ts doesn't cut it. Millisecond accuracy is way too imprecise for serious modern timing. And it's a little too cumbersome, anyway.

It would be great if we had something like a quad-t, which returned a scalar floating point value equal to the number of seconds elapsed since the start of the session. It's precision would be whatever the operating system supports. These days, that usually means microseconds or nanoseconds.
drab
 
Posts: 315
Joined: Thu Oct 09, 2014 6:23 am

Re: getting the precise clock time

PostPosted by drab » Thu Oct 09, 2014 12:08 pm

It would have to be precise enough so that

quad-t - quad-t

is never 0.
drab
 
Posts: 315
Joined: Thu Oct 09, 2014 6:23 am

Re: getting the precise clock time

PostPosted by forummaster » Mon Oct 20, 2014 8:35 am

As we discussed via email, this feature is implemented in the latest beta version in http://www.nars2000.org/download/binaries/beta/.
forummaster
 
Posts: 567
Joined: Wed Jan 23, 2013 1:00 pm

Re: getting the precise clock time

PostPosted by Paul Robinson » Tue Nov 03, 2015 5:32 am

I just tried it about 30 seconds ago:
⎕t
317008.4945
⎕t-⎕t
¯0.008968667826
⎕t-⎕t
¯0.000003422261216
⎕t-⎕t
¯0.000002933375072
⎕t-⎕t
¯0.000003422261216
⎕t-⎕t
¯0.000002933375072
⎕t,' ',⎕t
317072.6566 317072.6564

If it makes any difference, my computer is a 6-core AMD 3GHZ running Windows 10 upgrade from Windows 7 professional 64-bit. NARS2000 version is 0.4.10.1. Come to think about it, if APL didn't already include the ? operator this would probably make for a pretty good random number generator.
Paul Robinson
 
Posts: 11
Joined: Fri Feb 22, 2013 12:57 am


Return to New System Functions

Who is online

Users browsing this forum: No registered users and 1 guest

cron