--background--

DESCRIPTION

timer.device/--background--

   Commonly used structures

    o timerequest
    o timeval
    o EClockVal

   Timer Units

    When the timer.device is opened via exec.library/OpenDevice(), there are
    several units to choose from which vary in accuracy and/or use

    o UNIT_MICROHZ
    o UNIT_ECLOCK
    o UNIT_CPUCLOCK
    o UNIT_VBLANK
    o UNIT_WAITUNTIL
    o UNIT_WAITECLOCK
    o UNIT_WAITCPUCLOCK

   Additional functions

    While timer.device uses the standard device calls to perform timer
    functions, it also has some library functions added which are used
    as direct library calls. This are

    timer.device/AddTime()
    timer.device/CmpTime()
    timer.device/SubTime()

    timer.device/GetSysTime()
    timer.device/ReadEClock()

    timer.device/ReadCPUClock()
    timer.device/GetUpTime

AbortIO

SYNOPSIS

    LONG AbortIO( struct timerequest *timeRequest );

DESCRIPTION

    This function call removes a previously added timerequest from the timer

INPUTS

    timeRequest  -  the timer request which is to be aborted

RESULT

    error - either 0 if the request was aborted or -1 otherwise. The io_Error
            field in the request structure will be set to IOERR_ABORTED for
            successful abort

NOTES

    This is usually called via the related exec.library/AbortIO() function.
    It is allowed to call this function from interrupt code.

SEE ALSO

AddTime

SYNOPSIS

    VOID AddTime( struct timeval *dest, CONST struct timeval *src );

INPUTS

    dest

CmpTime

SYNOPSIS

    LONG CmpTime( CONST struct timeval *dest, CONST struct timeval *src );

INPUTS

    dest  -
    src

GetSysTime

SYNOPSIS

    VOID GetSysTime( struct timeval *dest );

GetUpTime

SYNOPSIS

    VOID GetUpTime( struct timeval *dest );

INPUTS

    dest

ReadCPUClock

SYNOPSIS

    ULONG ReadCPUClock( UQUAD *dest );

ReadEClock

SYNOPSIS

    ULONG ReadEClock( struct EClockVal *dest );

INPUTS

    dest

SubTime

SYNOPSIS

    VOID SubTime( struct timeval *dest, CONST struct timeval *src );

INPUTS

    dest  -
    src

TR_ADDREQUEST

INPUTS

    timer request

TR_GETSYSTIME

INPUTS

    timer request

TR_SETSYSTIME

INPUTS

    timer request