home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / FileMover / HF-OM1.DMS / in.adf / OpusSDK.lha / SDK / docs / timer.doc < prev   
Encoding:
Text File  |  1996-09-01  |  5.0 KB  |  183 lines

  1. dopus5.library/AllocTimer                           dopus5.library/AllocTimer
  2.  
  3.     NAME
  4.         AllocTimer - allocate a timer handle
  5.  
  6.     SYNOPSIS
  7.         AllocTimer(unit, port)
  8.                     D0    A0
  9.  
  10.         TimerHandle *AllocTimer(ULONG, struct MsgPort *);
  11.  
  12.     FUNCTION
  13.         This function allocates a timer handle to enable easy use of the
  14.         timer.device. You can supply a message port for it to use,
  15.         or have it create one for you. If you do not supply a message port,
  16.         the "port" field of the returned TimerHandle structure contains
  17.         the address of the port that was created for you.
  18.  
  19.     INPUTS
  20.         unit - the timer.device unit you wish to use (eg UNIT_VBLANK)
  21.         port - message port to use (or NULL to have one created)
  22.  
  23.     RESULT
  24.         Returns a TimerHandle to use with the other functions.
  25.  
  26.     SEE ALSO
  27.         FreeTimer(), StartTimer()
  28.  
  29. dopus5.library/CheckTimer                           dopus5.library/CheckTimer
  30.  
  31.     NAME
  32.         CheckTimer - see if a timer request has completed
  33.  
  34.     SYNOPSIS
  35.         CheckTimer(handle)
  36.                      A0
  37.  
  38.         BOOL CheckTimer(TimerHandle *);
  39.  
  40.     FUNCTION
  41.         This function allows you to discover if a timer request you have
  42.         started has completed.
  43.  
  44.     INPUTS
  45.         handle - timer handle
  46.  
  47.     RESULT
  48.         Returns TRUE if the request is complete, or FALSE if it has not
  49.         completed or is invalid.
  50.  
  51.     SEE ALSO
  52.         StartTimer(), StopTimer()
  53.  
  54. dopus5.library/FreeTimer                             dopus5.library/FreeTimer
  55.  
  56.     NAME
  57.         FreeTimer - free a timer handle
  58.  
  59.     SYNOPSIS
  60.         FreeTimer(handle)
  61.                     A0
  62.  
  63.         void FreeTimer(TimerHandle *);
  64.  
  65.     FUNCTION
  66.         This function frees a timer handle created with AllocTimer(). Any
  67.         outstanding request is aborted automatically. If you supplied your
  68.         own message port to the AllocTimer() function, you are responsible
  69.         for deleting the port yourself.
  70.  
  71.     INPUTS
  72.         handle - timer handle
  73.  
  74.     SEE ALSO
  75.         AllocTimer()
  76.  
  77. dopus5.library/GetTimerBase                       dopus5.library/GetTimerBase
  78.  
  79.     NAME
  80.         GetTimerBase - get a pointer to the timer.device library base
  81.  
  82.     SYNOPSIS
  83.         GetTimerBase()
  84.  
  85.         struct Libary *GetTimerBase(void);
  86.  
  87.     FUNCTION
  88.         This function returns a pointer to the library base of the
  89.         timer.device. The library base pointer is needed if you want to call
  90.         any of the library functions of the timer.device. This routine saves
  91.         you having to open the timer.device to get this base pointer.
  92.  
  93.     INPUTS
  94.         none
  95.  
  96.     RESULT
  97.         Returns struct Library * pointer. You must NOT call CloseLibrary() on
  98.         this pointer.
  99.  
  100. dopus5.library/StartTimer                           dopus5.library/StartTimer
  101.  
  102.     NAME
  103.         StartTimer - send a timer request
  104.  
  105.     SYNOPSIS
  106.         StartTimer(handle, seconds, micros)
  107.                      A0       D0      D1
  108.  
  109.         void StartTimer(TimerHandle *, ULONG, ULONG);
  110.  
  111.     FUNCTION
  112.         This function starts a timer request for a given period of time.
  113.         Your code should wait on "handle->port" for a signal indicating a
  114.         completed request. You can call CheckTimer() at any time to see if
  115.         the request has been completed.
  116.  
  117.     INPUTS
  118.         handle - timer handle
  119.         seconds - number of seconds for the request
  120.         micros - number of microseconds (0-999999)
  121.  
  122.     NOTES
  123.         You can call this routine with a request already pending; the first
  124.         request will automatically be aborted.
  125.  
  126.     SEE ALSO
  127.         AllocTimer(), StopTimer(), CheckTimer()
  128.  
  129. dopus5.library/StopTimer                             dopus5.library/StopTimer
  130.  
  131.     NAME
  132.         StopTimer - stop a timer request in progress
  133.  
  134.     SYNOPSIS
  135.         StopTimer(handle)
  136.                     A0
  137.  
  138.         void StopTimer(TimerHandle *);
  139.  
  140.     FUNCTION
  141.         This function aborts a timer request that was previously started
  142.         with StartTimer(). If the request has already completed, this
  143.         function simply does the cleanup.
  144.  
  145.     INPUTS
  146.         handle - timer handle
  147.  
  148.     SEE ALSO
  149.         AllocTimer(), StartTimer(), CheckTimer()
  150.  
  151. dopus5.library/TimerActive                         dopus5.library/TimerActive
  152.  
  153.     NAME
  154.         TimerActive - check if a timer request is pending
  155.  
  156.     SYNOPSIS
  157.         TimerActive(handle)
  158.                       A0
  159.  
  160.         BOOL TimerActive(TimerHandle *);
  161.  
  162.     FUNCTION
  163.         If you lose track of (or can't be bothered keeping track of)
  164.         whether or not you have a pending timer request, this function
  165.         allows you to find out.
  166.  
  167.         This function is actually not really necessary. All the timer
  168.         functions are robust enough to cope with multiple requests
  169.         (a StartTimer() with an already-pending request), or a StopTimer()
  170.         when a request is already complete (or was never sent), or any of
  171.         the other "error" conditions that the timer.device is usually
  172.         sensitive to.
  173.  
  174.     INPUTS
  175.         handle - timer handle
  176.  
  177.     RESULT
  178.         Returns TRUE if there is a request pending.
  179.  
  180.     SEE ALSO
  181.         AllocTimer()
  182.  
  183.