Skip to content

convert_timedelta_to_milliseconds_int32 internally assumes int32 input would be in seconds #2148

Open

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

Activity

  1. marcoskirsch commented on Dec 9, 2025

    @marcoskirsch
    Member

    Can you clarify which driver runtime function you need this change for?

  2. vnktshr21 commented on Dec 18, 2025

    @vnktshr21
    CollaboratorAuthor

    I've updated the description to list the driver runtime functions across the repository which could pass a wrong millisecond value to their underlying C function because of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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