Lasso Soft Inc. > Home

[ micros ]

Method

[micros] returns an integer representing the number of microseconds recorded on the machine's internal clock. Can be used for very precise timing of code execution to the 1/1,000,000 of a second.

  • Syntax
micros
Examples
  • Beginner

To time the execution of code:

Use the [micros] method. The following example times the execution of an arbitrary code sample.

Code

var('start') = micros
// code to time
'Execution time: ' + (micros - $start) + ' microseconds.'

Result

Execution time: 1198516 microseconds.

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft