Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
benchmark_timestamp(3)		  Arcan Lua API 	  benchmark_timestamp(3)

NAME
     benchmark_timestamp - Sample a timekeeping source.

SYNOPSIS
     number:timestamp
     benchmark_timestamp( number:stratum=0 )

DESCRIPTION
     This function queries some system specific timestamp source for a value us-
     able  for tracing and benchmarking purposes. The accuracy and precision may
     vary depending on if benchmark trace data collection is enabled or not,  as
     well as the security level of the application running. The optional stratum
       argument  specifies what kind of timekeeping source should be used, where
     the default value (0) will be some kind of monotonic system clock	in  mil-
     lisecond  resolution.  Other  defined  stratum values are: 1: seconds since
     epoch (1970-01-01), non-monotonic. -1: microseconds in  system  clock.  Se-
     lecting an invalid stratum is a terminal state transition.

NOTES
     1	    As	the  name  implies,  this is primarily intended for benchmarking
	    purposes. Real-world timekeeping cases should be avoided if possible
	    as the API	does not contain sufficient functions for  handling  the
	    usecases that appear when dealing with locales, adjustments etc.

system				   August 2026		  benchmark_timestamp(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=benchmark_timestamp&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help