TyTest is a Tycho package that contains C code for testing other Tycho C packages.
Contents
::tycho::testtask
is a Tcl procedure that implements a
C "task" in the structure required by the Tycho
Scheduler
.
All it does is count furiously until its time slice is up, and then
sets a Tcl variable to the value of the counter. Although this
functionality is rather useless, it does provide an interesting
comparison of the relative execution speed of C and Tcl! It has three
argument formats:
::tycho::testtask setup countername
countername
is the name of the Tcl variable
that will be updated at the end of its time slice.
::tycho::testtask execute
::tycho::testtask wrapup
To run a demonstration of the C task:
source $tycho/src/tytest/testtask.tcl
::tycho::timer period 200
Source files: