main
1using System;
2
3namespace jive
4{
5 public class TimerFactory : ITimerFactory
6 {
7 public System.Timers.Timer create_for(TimeSpan span)
8 {
9 if (span.Seconds > 0)
10 {
11 var milliseconds = span.Seconds*1000;
12 return new System.Timers.Timer(milliseconds);
13 }
14 return new System.Timers.Timer(span.Ticks);
15 }
16 }
17}