NanoTime#

class swordfish._swordfishcpp.NanoTime(data: int)#
class swordfish._swordfishcpp.NanoTime(hour: int, minute: int, second: int, nanosecond: int)
class swordfish._swordfishcpp.NanoTime

Represents a Swordfish NanoTime object.

参数:
  • data (int, optional) -- A Python int used to initialize the NanoTime object (e.g., a timestamp).

  • hour (int, optional) -- The hour component of the NanoTime object.

  • minute (int, optional) -- The minute component of the NanoTime object.

  • second (int, optional) -- The second component of the NanoTime object.

  • nanosecond (int, optional) -- The nanosecond component of the NanoTime object.

示例

>>> import swordfish as sf
>>> sf.data.NanoTime()
NanoTime(null)
>>> sf.data.NanoTime(3)
NanoTime(00:00:00.000000003)
>>> sf.data.NanoTime(18, 0, 40, 30)
NanoTime(18:00:40.000000030)
NULL_VALUE: NanoTime#