Exemplo n.º 1
0
        /// <summary>
        /// Gets the offset time from ticks
        /// </summary>
        /// <param name="captureTimerInfo"></param>
        /// <param name="ticks"></param>
        /// <returns></returns>
        public static DateTime GetOffsetTime(this CaptureTimerInfo captureTimerInfo, long ticks)
        {
            //Get the seconds
            var seconds = captureTimerInfo.TicksToSeconds(ticks);

            //Connvert to seconds
            return(captureTimerInfo.StartTime.AddSeconds(seconds));
        }
Exemplo n.º 2
0
        /// <summary>
        /// TickstoMiliseconds
        /// </summary>
        /// <param name="captureTimerInfo"></param>
        /// <param name="ticks"></param>
        /// <returns></returns>
        public static double TicksToMilliseconds(this CaptureTimerInfo captureTimerInfo, long ticks)
        {
            //return ((double)ticks * 1000.0) / ((double)captureTimerInfo.TicksPerSecond);

            return(captureTimerInfo.TicksToSeconds(ticks) * 1000.0);
        }