Category : Files from Magazines
Archive   : DFPP01.ZIP
Filename : CLOCK.CPP

 
Output of file : CLOCK.CPP contained in archive : DFPP01.ZIP

// ------- clock.cpp

#include "desktop.h"

Clock::Clock()
{
clocktimer.SetTimer(0);
}

void Clock::DispatchEvent()
{
if (clocktimer.TimedOut()) {
// -------- reset the timer
clocktimer.SetTimer(19); // approx. 19 tics/second
// -------- post the clock event
if (desktop.ApplWnd() != NULL)
desktop.ApplWnd()->ClockTick();
}
}