nip.utils.timing.TimeInfoPrinter#

class nip.utils.timing.TimeInfoPrinter(num_digits: int = 8)[source]#

Class to print the current time and a message.

Parameters:

num_digits (int, default=8) – The number of digits to print in the time difference

Methods Summary

__init__([num_digits])

disable()

Disable the printer.

enable()

Enable the printer.

print([message])

Print the current time and the message.

set_enabled_state(state)

Set the enabled state.

Attributes

FORCE_DISABLE

enabled

Whether the printer is enabled.

Methods

__init__(num_digits: int = 8)[source]#
disable()[source]#

Disable the printer.

enable()[source]#

Enable the printer.

print(message: str = '')[source]#

Print the current time and the message.

Parameters:

message (str, default="") – The message to print

set_enabled_state(state: bool)[source]#

Set the enabled state.

Parameters:

state (bool) – The state to set