Class Watch

Class Watch

Placement in the overall structure

Module
device
Base classes
Gate
PIT
Derived classes
None
Time of creation
Task 5
Files
watch.h watch.cc

Description

The Watch class handles timer interrupts by managing a time slice and triggering a process switch if necessary.

Public methods

Watch (int us)
In the constructor, the timer is initialised to periodically interrupt at intervals of approximately us microseconds.
void windup ()
"Winds up" the Watch. To do this, the watch object must register with the Plugbox plugbox and allow the interrupts of the timer module with the help of the global pic object.
bool prologue ()
Contains the prologue of the interrupt handler.
void epilogue ()
This method triggers the process switch.