Skip to content

Instantly share code, notes, and snippets.

@gbellmann
Created August 31, 2016 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gbellmann/818d7651b59be8a99b64144e1299f1d9 to your computer and use it in GitHub Desktop.
Save gbellmann/818d7651b59be8a99b64144e1299f1d9 to your computer and use it in GitHub Desktop.
protected override async Task RunAsync(CancellationToken cancellationToken)
{
while (!cancellationToken.IsCancellationRequested)
{
ServiceEventSource.Current.ServiceMessage(this, "Hello World at " + DateTime.Now.ToLongTimeString());
await Task.Delay(TimeSpan.FromSeconds(5), cancellationToken);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment