Timing functions and processes in aplc

Moderator: Dr.BeauWebber

Timing functions and processes in aplc

Postby Dr.BeauWebber » Wed May 29, 2013 6:14 pm

A very common need when testing is to time functions and processes.
Aplc offers a number of facilities for this, and much to my surprise (given a hack I had to make), they actually seem to work in the e-run Parallella simulator - we still have to see if they do on an actual chip :

Consider the following trivial aplc program :
Code: Select all
'start'
#ts
6 .format #jts
#dl 1
6 .format #jts
#ts
'end'

On the second line this prints a time-stamp in human readable form,
Then it prints the Julian-time-stamp in seconds, a 64bit representation of time that is extremely useful for real-time work
Then there is a 1 second delay. (the actual delay is reported)
And then a Julian-time-stamp and a human readable time-stamp.

Code: Select all
$  aplcc delay.apl
$  ./a.exe
start
 2013 5 29 18 42 23 14
 1369849343.014959
 1.000057
 1369849344.016016
 2013 5 29 18 42 24 16
end


And on the Parallella simulator :
Code: Select all
$ ./e-aplcc delay.c
$ ../../INSTALL/bin/e-run ./a.out
start
 2013 5 29 17 42 45 999
 1369849366.001273
 1.000057
 1369849367.008331
 2013 5 29 17 42 47 12
end
Last edited by Dr.BeauWebber on Wed May 29, 2013 9:33 pm, edited 1 time in total.
Reason: correct typo
User avatar
Dr.BeauWebber
 
Posts: 114
Joined: Mon Dec 17, 2012 4:01 am
Location: England

Return to APL

Who is online

Users browsing this forum: No registered users and 1 guest