Example #1
0
        public IDisposable StartTimer(TimeSpan interval, Action tick)
        {
            var msec = interval.TotalMilliseconds;

            if (msec <= 0)
            {
                throw new ArgumentException("Don't know how to create a timer with zero or negative interval");
            }
            var imsec = (uint)msec;

            if (imsec == 0)
            {
                imsec = 1;
            }
            return(GlibTimeout.StarTimer(imsec, tick));
        }
Example #2
0
 public IDisposable StartTimer(TimeSpan interval, Action tick)
 {
     return(GlibTimeout.StarTimer((uint)interval.TotalMilliseconds, tick));
 }