Advertisement
MarkGora

Untitled

Sep 15th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Threading;
  7.  
  8. namespace Simulator
  9. {
  10. class OfficeClerk
  11. {
  12. Random rnd;
  13.  
  14. protected int _timeReception;
  15. public int TimeReception
  16.  
  17. {
  18. get
  19. {
  20. return _timeReception;
  21. }
  22. }
  23.  
  24. public OfficeClerk()
  25. {
  26. rnd = new Random();
  27. }
  28.  
  29. public async Task ServiceClerkAsync ()
  30. {
  31. _timeReception = rnd.Next(30, 40);
  32. await Task.Run(() => Thread.Sleep(_timeReception));
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement