home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 2 / DATAFILE_PDCD2.iso / utilities2 / desklib / !DeskLib / h / Time < prev    next >
Encoding:
Text File  |  1993-05-26  |  1.3 KB  |  37 lines

  1. /*
  2.     ####             #    #     # #
  3.     #   #            #    #       #          The FreeWare C library for 
  4.     #   #  ##   ###  #  # #     # ###             RISC OS machines
  5.     #   # #  # #     # #  #     # #  #   ___________________________________
  6.     #   # ####  ###  ##   #     # #  #                                      
  7.     #   # #        # # #  #     # #  #    Please refer to the accompanying
  8.     ####   ### ####  #  # ##### # ###    documentation for conditions of use
  9.     ________________________________________________________________________
  10.  
  11.     File:    Desklib:Time.h
  12.     Author:  Copyright © 1992 Jason Williams
  13.     Version: 1.00 (14 May 1992)
  14.     Purpose: time handling
  15. */
  16.  
  17.  
  18. #ifndef __dl_time_h
  19. #define __dl_time_h
  20.  
  21.  
  22.   /*  Time_Monotonic
  23.    *  Veneer for the OS_ReadMonotonicTime SWI
  24.    *  Returns an integer representing the time since the computer was switched
  25.    *  on, in centiseconds.
  26.    *  Used with Wimp_PollIdle to poll every now and then, as in:
  27.    *    time = Time_Monotonic();
  28.    *    Wimp_PollIdle(mask, block, time + 100);  // Pollidle for 1 sec (100cs)
  29.    *
  30.    *  Can also be used to time things, i.e.
  31.    *    time = Time_Monotonic();
  32.    *    while (Time_Monotonic < time+100) |* wait *| ;    // Wait for 1 second
  33.    */
  34. extern int Time_Monotonic(void);
  35.  
  36. #endif
  37.