public BackgroundServerTimeTimer() { HostingEnvironment.RegisterObject(this); hub = GlobalHost.ConnectionManager.GetHubContext<ClientPushHub>(); taskTimer = new Timer(OnTimerElapsed, null, TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(5)); }