Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - dayseconds() return the number of seconds since midnight http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 dayseconds()        Return the number of seconds since midnight
------------------------------------------------------------------------------
 Declaration
   system.hdr

 Syntax
   func dbl dayseconds extern

 Arguments
   None.

 Return
   The number of seconds elapsed since midnight (hundredth seconds included).

 Description
   The dayseconds() function returns the number of seconds elapsed since
   midnight, with one hundredth second precision.

 Example
   #define EXAMPLE_SYSTEM
   #include example.hdr

   // The dayseconds() function can be used for measuring the execution time
   // of portions of a program (e. g. for profiling)
   
   proc Test_dayseconds
   vardef
      ulong n
      dbl   eTime
   enddef
   eTime := dayseconds()                        // start time
   for n := 1 to 200000UL                       // loop
   next
   ? "It took", ( dayseconds() - eTime ):1:3, ; // elapsed time
      "seconds to execute a 200,000 loop"
   endproc

   proc main
   Test_dayseconds()
   endproc

See Also: daysec() seconds()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson