Instruction manual
AMPDIO DRIVERS
Page 126
6.4.7.3 Get Stopwatch Elapsed Time — TCgetElapsedTime
Gets the elapsed time, in milliseconds, since a given stopwatch was started.
i = TCgetElapsedTime (h, hS, ptime)
where h short: board handle as issued by the
registerBoardEx function.
hS short: handle to stopwatch as issued by the
TCsetStopwatch function.
ptime pointer to long: pointer to a long integer
variable into which the elapsed time result will
be placed.
Returns short: OK
or ERRHANDLE
ERRCHAN
ERRDATA
Prior Calls registerBoardEx
TCsetStopwatch
TCstartStopwatch
See Also TCgetTimeStr
TCsetEventRecorder
6.4.7.4 Prepare an Event Time Recorder — TCsetEventRecorder
Sets up an event recorder that records the times of positive edges on a PPI Port C bit 0 digital
input (DI) line. The times recorded are the elapsed time since the given stopwatch was
started). This is performed by using a stopwatch, previously set up by a call to
TCsetStopwatch, and enabling the DI line to generate an interrupt. An interrupt service routine
(ISR) stores the elapsed time from the stopwatch into a previously allocated data buffer for
each event. See section 3.4.1 for more details on the Event Recorder application.
i = TCsetEventRecorder (h, hS, chip, hB)
where h short: board handle as issued by the
registerBoardEx function.
hS short: stopwatch handle as issued by the
TCsetStopwatch function.
chip short: address offset of the digital input chip
from which Port C bit 0 will be used as the
event input. Use one of the following pre-
defined constants:-
PPIX = 0
PPIY = 8
PPIZ = 16
hB short: buffer handle as issued by the
allocateLongBuf function.