Utilities

Frends.Utilities.Sleep / 2.0.0

Summary

Waits for a given duration, and cancels cleanly if the Process is stopped rather than blocking until the delay expires.

Typical use — spacing out polling attempts, and backing off before a retry against a rate-limited service

Details

Frends version
5.7 and newer
Agent
Crossplatform
Target framework
net8.0
2.0.02026-11-03
Changed
  • Added a required Options parameter with ThrowErrorOnFailure and ErrorMessageOnFailure for error handling.
  • Breaking Replaced the SleepResult result property with Success and added an Error property that is populated when the Task fails and ThrowErrorOnFailure is false.
  • Updated the Task to target .NET 8.
1.0.02022-09-06
Added
  • Initial implementation
An unhandled error has occurred. Reload 🗙
Reconnecting… Connection lost.