timetools

timestamp_tools

check_timestamp(timestamp, timestamp_resolution)[source]
create_timestamp_signal(resolution, length, start, rate)[source]

Generates a timestamp array.

Parameters:
  • resolution (str) – Timestamp resolution. It can be ‘ns’, ‘ms’, ‘s’ or ‘min’.

  • length (float) – Length of timestamp array to be generated.

  • start (float) – Starting time.

  • rate (float) – Rate of increment.

Raises:
  • ValueError – If starting time is less then zero.

  • ValueError – If resolution is undefined.

Returns:

Timestamp array.

Return type:

ArrayLike