Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

What is the most precised DateTime I can use in NET 3.5?

Posted on 2013-01-21
6
Medium Priority
?
308 Views
Last Modified: 2013-01-22
What is actally precision of NET 3.5 DateTime variable ? It is 16 miliseconds? Do I have a option to replace it with some other type? Maybe with DateTimeOffset – is it has better precision?

 My situation is that I have a WinForm C# 2008 Net 3.5 project which work with Start Date and then add between 100 and 500 time durations in miliseconds /video files duration/ . I understand that best is to keep the start date in DateTime varibale and to get current date   with code
   
            dtCurr = dtStart.AddMilliseconds(lItemRealDurMS);


This almost will solve the problem, as I’ll get inaccuracy with only 1 calculcation, not with all 100-500 calculations. Is that correct? Anyway, I’m interesting of the most precise DateTime I can use in NET 3.5
0
Comment
Question by:dvplayltd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 53

Accepted Solution

by:
Dhaest earned 2000 total points
ID: 38800246
0
 
LVL 83

Expert Comment

by:David Johnson, CD, MVP
ID: 38800939
With video files why are you not counting the frames and dividing by the fps? You can't get any more precise with a video than an individual frame
0
 

Author Comment

by:dvplayltd
ID: 38801684
TO  Dhaest

Well, I find this articles before you send me. Anyway, DateTimeOffset is more precise than DateTime , or it is the same?

To ve3ofa
Well, for my project - workign with a playlist with 24 hours duration few seconds in a day are acceptable solution. Anyway, more accurance is not possible for ordinary PC - most PC timer move between 1 and 5 seconds for a day .
And I already have other system which works with miliseconds, not with frame count.
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 83

Expert Comment

by:David Johnson, CD, MVP
ID: 38801798
Video measurement is still more precise..  if the file is 2300 frames @ 23.97 fps the play length is 95.954 seconds depending upon the # of video's, involved plus the queuing speed a 24 hour playlist may be +/- a few minutes.

100 and 500 time durations in miliseconds /video files duration (this is what confused me)
0
 

Author Comment

by:dvplayltd
ID: 38801981
To ve3ofa

100 and 500 time durations in miliseconds  - i mean that I loop via all file's duration and show the current time every file start .
0
 

Author Closing Comment

by:dvplayltd
ID: 38805748
10x
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question