-
Notifications
You must be signed in to change notification settings - Fork 1
Page 2: Setting Up The Timer
Colin Kiama edited this page Jan 14, 2018
·
1 revision
// Creates a new timer. Its default interval is 100 milliseconds
// and its default duration is 30 seconds
Timer myTimer = new Timer();
// Creates a new timer with a duration of 20 minutes.
// Its default interval is 100 milliseconds.
TimeSpan myDuration = new TimeSpan(0,20,0);
Timer myTimer = new Timer(myDuration);
// Creates a new timer with a duration of 20 minutes
// and a timer tick interval of 100 milliseconds
TimeSpan myDuration = new TimeSpan(0,20,0);
TimeSpan myInterval = new TimeSpan(0,0,0,0,100);
Timer myTimer = new Timer(myDuration, myInterval);