2.3 Performing an Action at Specified Intervals

The profile provider provides the tick probes that
you can use to sample some aspect of a system's state at regular intervals. You must load the
profile kernel module to use these probes.

The following example program, tick.d, declares and initializes the
variable i when the D program starts, displays its initial value,
increments the variable and prints its value once every second, and displays the final value
of i when the program exits.