##### Shinobi Library - Timer Function

# syTmrGenSetClock

Sets the base clock for the general-purpose timer

### FORMAT

`

  void syTmrGenSetClock( clock )
  SYD_TMR_CLOCK clock

`

### PARAMETER

  `clock` | Counter clock

### RETURN

  None

### DESCRIPTION

  Sets the base clock for the general-purpose timer. The base clock is given as a fraction of the CPU's peripheral module clock(50MHz); four settings are possible.

  The following values are specified for `clock`.

  Value | Meaning | Time equivalent to 1 count | Upper limit of time that can be counted
  SYD_TMR_CLOCK_P4 | Phi/4 | 0.08 microseconds | Approximately 21 minutes
  SYD_TMR_CLOCK_P16 | Phi/16 | 0.32 microseconds | Approximately 22 hours and 52 minutes
  SYD_TMR_CLOCK_P64 | Phi/64 | 1.28 microseconds | Approximately 91 hours and 38 minutes
  SYD_TMR_CLOCK_P1024 | Phi/1024 | 20.48 microseconds | Approximately 17 years

  Because the counter value is 32 bits, the time needed in order to get a unique value depends on the counter clock that is set. The default is "divided by 64", so that 100000000h x 1.28 micro=5497.558 seconds(=approximately 91 hours and 38 mintues).

syTmrGenSetClock

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999