Skip to content

Class Clock

Kristian Virtanen edited this page Oct 28, 2024 · 11 revisions

Description:

The Clock class provides access to the system's date and time, offering properties to retrieve current time, date, and related information in different formats.

Properties

Clock.LastError

  • Description: Stores the last error message, if any operation fails, including a timestamp in yyyy-MM-dd HH:mm:ss format.
  • Example: "2024-10-16 14:30:00: Example error message"
  • Differences from orig. SB: Not available at original SB.

Clock.Time

  • Description: Returns the current system time as a string in HH:mm:ss format or another format, if set with Clock.TimeFormat.
  • Example: "14:30:45"
  • Differences from orig. SB: Original uses system time format, where as SBOE uses format HH:mm:ssas default.

Clock.TimeFormat

Clock.Date

  • Description: Returns the current system date as a string in yyyy-MM-dd format or another format, if set with Clock.TimeFormat.
  • Example: "2024-1+.28"
  • Differences from orig. SB: Original uses system date format, where as SBOE uses format yyyy-MM-ddas default.

Clock.DateFormat

Clock.Year

  • Description: Returns the current system year as an integer.
  • Example: 2024
  • Differences from orig. SB: none.

Clock.Month

  • Description: Returns the current system month as an integer.
  • Example: 10
  • Differences from orig. SB: none.

Clock.Day

  • Description: Returns the current day of the month as an integer.
  • Example: 16
  • Differences from orig. SB: none.

Clock.WeekDay

  • Description: Returns the current day of the week as a string.
  • Example: "Wednesday"
  • Differences from orig. SB: none.

Clock.Hour

  • Description: Returns the current system hour as an integer.
  • Example: 14
  • Differences from orig. SB: none.

Clock.Minute

  • Description: Returns the current system minute as an integer.
  • Example: 30
  • Differences from orig. SB: none.

Clock.Second

  • Description: Returns the current system second as an integer.
  • Example: 45
  • Differences from orig. SB: none.

Clock.Millisecond

  • Description: Returns the current system millisecond as an integer.
  • Example: 123
  • Differences from orig. SB: none.

Clock.ElapsedMillisecondsAfterStart

  • Description: Returns the number of milliseconds that have elapsed since the program started.
  • Example: 5000
  • Differences from orig. SB: Not available in original SB.

Clock.ElapsedMilliseconds

  • Description: Returns the number of milliseconds that have elapsed since January 1, 2024 (UTC).
  • Example: 2000000000
  • Differences from orig. SB: Original returned milliseconds from the start of year 1900.

Top