Guest User

Untitled

a guest
Feb 18th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. TimeSpan stableTimeSpan = new TimeSpan(0, 0, 10);
  2. DateTime stableTimerStart = DateTime.Now;
  3.  
  4. float t = (DateTime.Now.Ticks - stableTimerStart.Ticks) / (float)stableTimeSpan.Ticks;
  5. int test = unchecked((int)(t * 100));
  6. MyProgressBar.value = test;
Add Comment
Please, Sign In to add comment