An implementation of IScheduler that doesn't actually delay. This is useful for tests
which aren't interested in precise timing, but just want to be able to use a scheduler.
For more fine-grained control, use FakeScheduler.
public Task Delay(TimeSpan delay, CancellationToken cancellationToken)
Returns a task that will complete "nearly immediately": there's no set delay, but the task
yields before completing, avoiding synchronous execution leading to subtle bugs. The cancellation
token passed in is observed, causing an exception if it's already canceled.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis webpage details the \u003ccode\u003eNoOpScheduler\u003c/code\u003e class, a part of the \u003ccode\u003eGoogle.Api.Gax.Testing\u003c/code\u003e namespace, designed for testing scenarios within the .NET environment.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eNoOpScheduler\u003c/code\u003e implements the \u003ccode\u003eIScheduler\u003c/code\u003e interface but does not introduce any actual delays, making it suitable for tests where timing is not critical.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides a \u003ccode\u003eDelay\u003c/code\u003e method that accepts a \u003ccode\u003eTimeSpan\u003c/code\u003e and a \u003ccode\u003eCancellationToken\u003c/code\u003e, although it ignores the \u003ccode\u003eTimeSpan\u003c/code\u003e and only checks if the \u003ccode\u003eCancellationToken\u003c/code\u003e has been triggered, completing nearly immediately.\u003c/p\u003e\n"],["\u003cp\u003eAvailable versions of \u003ccode\u003eNoOpScheduler\u003c/code\u003e range from 3.2.0 to the latest version 4.10.0, which is the most recent release.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSchedulerExtensions.Sleep\u003c/code\u003e method, an extension method, is also covered here, with details on its functionality and parameters.\u003c/p\u003e\n"]]],[],null,[]]