ITimeU.Controllers.TimerController.GetStartruntime C# (CSharp) Method

GetStartruntime() private method

private GetStartruntime ( ) : System.Web.Mvc.ActionResult
return System.Web.Mvc.ActionResult
        public ActionResult GetStartruntime()
        {
            var timer = (TimerModel)Session["timer"];
            DateTime starttime;
            int runtime = 0;

            if (timer.StartTime.HasValue && timer.IsStarted)
            {
                starttime = timer.StartTime.Value;
                var ts = DateTime.Now - starttime;
                runtime = (int)ts.TotalMilliseconds;
            }
            return Content(runtime.ToString());
        }