Time#

class swordfish._swordfishcpp.Time(data: int)#
class swordfish._swordfishcpp.Time(hour: int, minute: int, second: int, millisecond: int)
class swordfish._swordfishcpp.Time

Represents a Swordfish Time object, initialized in one of three ways: with no arguments, with a Python int value, or with separate ints indicating hour, minute, second, and millisecond.

Parameters:
  • data (int, optional) – A Python int used to initialize the Time object.

  • hour (int, optional) – The hour component of the Time object.

  • minute (int, optional) – The minute component of the Time object.

  • second (int, optional) – The second component of the Time object.

  • millisecond (int, optional) – The millisecond component of the Time object.

Examples

>>> import swordfish as sf
>>> sf.data.Time()
Time(null)
>>> sf.data.Time(100)
Time(00:00:00.100)
>>> sf.data.Time(12, 1, 2, 0)
Time(12:01:02.000)
NULL_VALUE: Time#