Skip to content

convert_timedelta_to_milliseconds_int32 internally assumes int32 input would be in seconds #2148

@vnktshr21

Description

@vnktshr21

Description of issue

convert_timedelta_to_milliseconds_int32 internally calls into _convert_timedelta with a scaling factor of 1000. This assumes that a float input will always be in seconds. ie if I pass 10 to this method, it returns 10000 as the converted value in millisecond. This makes it not useful for an API method parameter which takes in value as milliseconds and should allow the value to be passed as raw milliseconds along with hightime.timedelta type.

Because of this issue, below API methods would get passed a wrong milliseconds value if the user passes a float value in milliseconds based on the parameter documentation:

  • nidmm
    • fetch
    • fetch_multi_point
    • fetch_waveform
    • fetch_waveform_into
    • read
    • read_multi_point
    • read_waveform
  • nifgen
    • wait_until_done
  • nirfsg
    • wait_until_settled
  • nise
    • wait_for_debounce
  • niswitch
    • wait_for_debounce
    • wait_for_scan_complete

System report

NA

Steps to reproduce issue

NA

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions