473,385 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Why Time Difference Differs For The Same Application !?

13
Hi,

I have an application, I made a time difference (in millisecons)
between two auto events within the application.

I ran it twice, but the result (milliseconds) is not the same.

WHY !?
Aug 17 '07 #1
5 1226
kenobewan
4,871 Expert 4TB
Curse you relativity! Was the first one slower?
Aug 17 '07 #2
TRScheel
638 Expert 512MB
Hi,

I have an application, I made a time difference (in millisecons)
between two auto events within the application.

I ran it twice, but the result (milliseconds) is not the same.

WHY !?
You might want to read up on Chaos Theory.

That and if you measure finely enough, you will note its never an identical span of time.
Aug 17 '07 #3
HTB
13
At first it was samller, then it increased, after that it came back
to the first value !


OK, I read that, very interesting. But I have to ask why the
milliseconds in DateTime have 7 digits, while I know
they are 4 digits (1 second = 1000 milliseconds) !?
Aug 17 '07 #4
TRScheel
638 Expert 512MB
[OK, I read that, very interesting. But I have to ask why the
milliseconds in DateTime have 7 digits, while I know
they are 4 digits (1 second = 1000 milliseconds) !?
You might want to know how many milliseconds total there are. If you want just the recent number, mod it by 1000.
Aug 17 '07 #5
Plater
7,872 Expert 4TB
You are doing something like:
Expand|Select|Wrap|Line Numbers
  1. DateTime start= DateTime.Now;
  2. //do all that code stuff you want to measure
  3. TimeSpan t=(DateTime.Now-start);
  4.  
Right?
I mean if you are doing any sort of I/O in your routine then it will never run the same time twice (well, depends on your precision)
Aug 17 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: cournape | last post by:
Hi there, I have some scientific application written in python. There is a good deal of list processing, but also some "simple" computation such as basic linear algebra involved. I would like to...
3
by: Jon S via DotNetMonster.com | last post by:
Hi all, Can someone please give me a brief explaination how each of the following differs? long lVariable; //Variable name and type. //How do the following methods differ??? 1) ...
15
by: Oleg Leikin | last post by:
Hi, (newbie question) I've created some simple .NET ASP application that should store cookies at the client machine. According to the documentation cookie expiration time is set via...
11
by: chopsnsauce | last post by:
Here's the example: Dim frm As New FORM1 Try frm.show Catch ex As Exception msgbox ex.message
4
by: Ravi Ambros Wallau | last post by:
Hi: We developed a set of ASP.NET Web Applications that never runs in stand-alone mode, but always inside a portal (Rainbow Portal). All modules are copied on that portal. My question is: load...
2
by: Ulrike Klusik | last post by:
Hello Folks, i've got two structural identical tables (including tablespace and indexes) with identical data, on which the access path of an SQL is differs. But I don't see a reason for the...
2
by: Mike | last post by:
I know, it is old question. Is there some new way to protect system time changes with C# 2.0? What is the best way based on your oppinion? Thanks, I appreciate your help. Mike
19
by: xianwei | last post by:
#include <stdio.h> #include <stdlib.h> #include <time.h> int main ( int argc, char *argv ) { long i = 10000000L; clock_t start, end; double duration;
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.