Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8076345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:14:34+00:00 2026-06-05T15:14:34+00:00

(Using WPF) In a small application that I wrote, I am using some count-down

  • 0

(Using WPF)

In a small application that I wrote, I am using some count-down timers.
For this I have used the DispatcherTimer.

counter01 = new DispatcherTimer();
counter01.Tick += new EventHandler(counter01_Tick);
counter01.Interval = new TimeSpan(0, 0, 1);

But now when I test/use the program, I have noticed that when it’s set to (for example) 60 minutes count-down, it gets a few minutes off compared to the real world time.

Could it be that for some reason DispatcherTimer is not always exactly 1 second if I use it like I did above?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T15:14:35+00:00Added an answer on June 5, 2026 at 3:14 pm

    Timers like this will never be absolutely exact. After all, it’s got to run on the dispatcher thread – what would you expect to happen if the dispatcher is busy processing some other thread at the same time?

    It’s likely to be close enough to be visibly ticking at about once per second – you should just take the current time and subtract that from the “target” time (or use a Stopwatch) to get a fairly-accurate count-down instead of just counting the number of times the timer has ticked.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small-scale WPF application using VB.net as the code behind and I
I have an application in WPF that is to be used exclusively by the
I've got small wpf application deployed using ClickOnce technology. The problem is that when
I'm working on writing a small application using the WPF MediaKit , and I
I'm using Visual Studio 2010 to create a small WPF application. I've created a
I have a small WPF application based on MVVM priniciples. So far I had
In my application (WPF) i have this window: public partial class Window1 : Window
I have developed a small chat client using WPF. In each chat window, it
After taking some small courses and using WPF and C# a bit I've decided
I'm working on a small C#/WPF application that interfaces with a web service implemented

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.