Next: Volumes Up: Programming Utilities Previous: Text Output

Time

Some basic utilities relating to time, date, and CPU time are provided.


public  Real  current_cpu_seconds( void )

Returns the number of CPU seconds used by the current process so far.


public  Real  current_realtime_seconds( void )

Returns the number of seconds that the current process has been running.


public  void  get_clock_time(
    char  time_str[] )

Copies the current clock time (hours and minutes) into a string.


public  void  get_date(
    char  date_str[] )

Copies the current date into a string.


public  void  format_time(
    char   str[],
    char   format[],
    Real   seconds )

Takes a time in seconds and a format string which has format components, i.e. ``%g%s'', and prints the time into the string str, in appropriate units of milliseconds, seconds, minutes, days, etc.


public  void  print_time(
    char   format[],
    Real   seconds )

Same as format_time, but calls print() with the result.


public  void  sleep_program(
    Real seconds )

Suspends the program for the specified number of seconds. Note that on most systems, this will only be performed to the nearest multiple of some particular time increment. On Silicon Graphics Systems this will be to the nearest hundredth of a second.



Next: Volumes Up: Programming Utilities Previous: Text Output


david@pet.mni.mcgill.ca
Fri Feb 17 15:37:42 EST 1995