Fix example

This commit is contained in:
2022-12-22 08:32:15 +01:00
parent 561f4f91aa
commit 302862fee4
4 changed files with 76 additions and 10 deletions

View File

@@ -15,19 +15,14 @@ namespace GerstITS.Examples.Jobs.SayHelloWorld.Jobs
private readonly SayHelloWorldJobConfiguration _configuration;
private readonly Stopwatch _stopWatch;
private readonly IRepository _repository;
private readonly ISystemClock _systemClock;
#endregion
#region Cosntructors
public SayHelloWorldJob(SayHelloWorldJobConfiguration configuration,
IRepository repository,
ISystemClock systemClock)
{
_systemClock = systemClock;
_repository = repository;
_configuration = configuration;
_stopWatch = new Stopwatch();
}
@@ -40,7 +35,6 @@ namespace GerstITS.Examples.Jobs.SayHelloWorld.Jobs
{
_stopWatch.Restart();
Thread.Sleep(4000);
var now = _systemClock.UtcNow;
_stopWatch.Stop();
Debug.WriteLine($"---> Say hello to world from {_configuration.Name}, Duration: {_stopWatch.ElapsedMilliseconds / 1000}s");