-
Notifications
You must be signed in to change notification settings - Fork 853
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Adapt position update interval of darwin, linux, web (#1492)
# Description - Linux: changed update interval from `1000ms` to `250ms` - Web: `position` was rounded to `1s` as its handed over as float, now it's multiplied with `1000` to profit from millisecond precision, update interval is still dependent on browser implementation - Darwin: changed update interval from `0.2ms` to `200ms`, which most probably was a mistake and caused much overhead
- Loading branch information
Showing
4 changed files
with
19 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
extension NumExtension on num { | ||
/// Converts [num] (expected in seconds) to the duration. | ||
Duration fromSecondsToDuration() => Duration( | ||
seconds: (isNaN || isInfinite ? 0 : this).round(), | ||
milliseconds: ((isNaN || isInfinite ? 0 : this) * 1000).round(), | ||
); | ||
} |