We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b740b4a + e03d269 commit 86747d7Copy full SHA for 86747d7
1 file changed
src/FSharp.Control.AsyncSeq/AsyncSeq.fs
@@ -5,6 +5,7 @@
5
namespace FSharp.Control
6
7
open System
8
+open System.Diagnostics
9
open System.IO
10
open System.Collections.Generic
11
open System.Threading
@@ -1068,10 +1069,10 @@ module AsyncSeq =
1068
1069
match rem with
1070
| Some rem -> async.Return rem
1071
| None -> Async.StartChildAsTask(ie.MoveNext())
- let t = DateTime.Now
1072
+ let t = Stopwatch.GetTimestamp()
1073
let! time = Async.StartChildAsTask(Async.Sleep (max 0 rt))
1074
let! moveOr = Async.chooseTasks move time
- let delta = int (DateTime.Now - t).TotalMilliseconds
1075
+ let delta = int ((Stopwatch.GetTimestamp() - t) * 1000L / Stopwatch.Frequency)
1076
match moveOr with
1077
| Choice1Of2 (None, _) ->
1078
if buffer.Count > 0 then
0 commit comments