convert_timedelta_to_milliseconds_int32 internally assumes int32 input would be in seconds
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 128
- Forks
- 110
- Avg merge
- 5d 14h
- Merged PRs (30d)
- 10
Description
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:
nidmmfetchfetch_multi_pointfetch_waveformfetch_waveform_intoreadread_multi_pointread_waveform
nifgenwait_until_done
nirfsgwait_until_settled
nisewait_for_debounce
niswitchwait_for_debouncewait_for_scan_complete
System report
NA
Steps to reproduce issue
NA
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing convert_timedelta_to_milliseconds_int32 and its call to _convert_timedelta, then inspect the listed nidmm, nifgen, nirfsg, nise, and niswitch methods that accept millisecond values. Verify the behavior for integer, float, and hightime.timedelta inputs, and consider the issue done when documented millisecond values are converted consistently across all affected APIs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100