Interface ISessionClock
The state of the standard library's DateTime module that outlives a call to it (MS-VBAL §6.1.2.4.2): the calendar its functions
work in, and the clock its properties read.
public interface ISessionClock
Remarks
The session is the program's system. Setting the system time (Time = , MS-VBAL §6.1.2.4.2.4) sets the time of this clock,
and never the machine's: from then on Now, Time and Timer read the time the program set, going on from it as the machine's clock does.
An End resets it with the rest of the session: the clock is the machine's again, and the calendar is Gregorian.
Properties
Calendar
The calendar the functions of the DateTime module work in (MS-VBAL §6.1.2.4.2.1); Gregorian until a program sets it.
VBCalendar Calendar { get; set; }
Property Value
Now
The current local date and time of the session: the machine's, unless a program set the time.
DateTime Now { get; }
Property Value
Methods
Reset()
The machine's clock and the Gregorian calendar again: the state of a session that no program has run in.
void Reset()
SetTime(TimeSpan)
Sets the time of day of the session's clock; the date stays what it is.
void SetTime(TimeSpan timeOfDay)
Parameters
timeOfDayTimeSpanThe time of day it is now, from 0:00:00 inclusive to 24:00:00 exclusive.