time

Wildly inaccurate timing in Flash?

Hi, I'm building a tool in flash to tell me how long it takes to load a bit of content off of a server. I'm doing foo = new Date().getTime(); // get the thing bar = new Date().getTime(); trace(bar-foo); Yet, somehow, the times just seem to fluctuate HUGELY, from 3ms to 150ms. When I test this using Python, the times are consistently ...

How much time do you spent on what task while working on a project?

How much time do you spend (in percent) in a project with writing actual code? writing unit tests? bug fixing? writing documentation? communicating with the customer? communicating with team members? setting up the project? integrating other parts? reviewing code from other developers? deployment? support? training? ... ...

Wrong output from date()

I am getting the date from my MySQL database and that date is correct, but when I use the date() function the minute part is stuck at 6 minutes. MySQL is returning 2010-06-15 09:59:18 Then in PHP I use this code ($row[4] is from my while loop): date('M d,Y H:m A',strtotime($row[4])) When I echo this out I get: Jun 15,2010 9:06 AM I...

Two seperate tm structs mirroring each other

Here is my current situation: I have two tm structs, both set to the current time I make a change to the hour in one of the structs The change is occurring in the other struct magically.... How do I prevent this from occurring? I need to be able to compare and know the number of seconds between two different times -- the current time a...

How are these numbers converted to a readable Date/Time string?

I have 2 XML files I'm reading - one has a date/time attribute that's readable (ex. May 1, 2010 12:03:14 AM) and the other... not so much (ex. 1272686594492). Both files have the complicated date/time format, but only the newer one has the readable version. I cannot figure out how to make the complicated version readable. Any ideas? The...

Ruby - Manipulating Time/DateTime by the Hour/Day?

Where can I find some examples on how to manipulate the time objects by days/hours/etc? I would like to do this: time.now_by_hour #=> "Tue Jun 15 23 MST 2010" time.now_by_day #=> ""Tue Jun 15 MST 2010" time.now_by_hour - 4.weeks - 3.days #=> "Sat May 15 MST 2010" What is the recommended order of operations? The reason for this is I ...

Add 30 seconds to the time with PHP

Hey all, just wondering how I can add 30 seconds on to this? $time = date("m/d/Y h:i:s a", time()); Thankyou, again. I wasn't sure how to do it because it is showing lots of different units of time, when I only want to add 30 seconds. ...

If current time is more than 30 seconds past time X (from the database)

How would I construct a statement like if current time ($time) is more than 30 seconds past time ($djs['currenttime'])? Would it be something like if ($time => $djs['currenttime'])? I can't figure it out with the 30 seconds..:). Thanks :). ...

GWT time/string formatting

How can I easily do the following in GWT? (The code below is illegal since String.format is not emulated.) long lTime = System.currentTimeMillis() % (24*60*60*1000); long lHour = lTime/(60*60*1000); long lMin = lTime/(60*1000)%60; long lSec = lTime/1000%60; long lMilli = lTime%1000; return String.format("%d.%.2d:%.2d.%.4d", lHour, lMin,...

obj-c : iphone programming NSTimeInterval problem

hi, i got a problem with my time interval. I need to get the interval of two times in this format : HH:MM. If i enter : 15:35 and 16:35 it is ok, but when i do 20:30 to 01:30, it gives me like 18 hours interval.. anyone have an idea? NSString *startDate= starthere.text; NSString *endDate = endhere.text; NSDateFormatter...

Displaying current time above the thumb of a slider in Silverlight

I've made a time slider in Silverlight. To style it, I've made a control template and modified the style. I've added a text field above the thumb (always centered above the thumb), which should display the time. However, I can't find any way to access the slider information (e.g. current value) or find another way to pass any informatio...

Correct way to textually report the remaining time on a long running process?

So you have a long running process, perhaps with a progress bar, and you want a text estimate of the remaining time, eg: "5 minutes remaining" "30 seconds remaining" etc. If you don't actually want to report clock time (due to accuracy or resolution or update-rate issues) but want to stick to the text summary, what is the correct paradi...

Is there any function in SQL Server to convert a number into Time format?

I am getting a whole number for the duration of product. For example : 62, 103, 184, 4543. I want to convert it in time format. Let say , in case of 62, it would format like '00:01:02'. I am looking for a function which can resolve my problem. Is there any function in SQL Server which convert a number into time format? ...

Javascript, Hour comparisson

Having two strings (start and end time) in such form "16:30", "02:13" I want to compare them and check if the gap is greater than 5 mins. How can this be achieved in Javascript in an easy way? ...

C++ counting execution time eror

Hi, I'm trying to count the execution of function in my code (that takes over an hour), and I'm using clock(), but I'm getting some errors, since the time calculated is negative. I'm doing like this: long double time; clock_t start, t_end; t_start = clock(); algorithm->execute(); t_end = clock(); time = ((long double) t_end - t_start)...

ASP.NET, Windows: Synchronizing System Time with current USA time zone

. Hi, We are building an ASP.NET application (with C#.net as language) and will be hosting on Windows Server 2003 Operating System. The server will be at USA. The problem here is that, we need to synchronize the server time with it’s current USA time zone. That mean we are thinking of automated time synchronization (without any human...

Comparing date("Y-m-d h:i:s");

Hi all, how can I make a conditional statement like if date("Y-m-d h:i:s"); is more than 30 seconds after date("Y-m-d h:i:s");. I've previously used something like date("Y-m-d h:i:s"); < date("Y-m-d h:i:s"); + 30, however this doesn't seem to work. Help? ...

convert to mysql datetime

hello, pls i want to convert this 06-29-2010 04:00PM to this format Y-m-d h:i:s in php thanks ...

How to prevent wrapping around of time when adding them in spreadsheet?

I have absolute values of time(as in stopwatch not date/time) in various cells and I would like to add them and keep them the same format(as an absolute value). I have formatted the cells using hh:mm:ss time format. But when I add two values like, 22:34:00 4:00:00 I get, 2:34:00 because of wrapping around the 24-hour tim...

Response time for a UIButton for an iPad application

hi guys, i have a simple UIButton that, once clicked, plays a 1 second sound. i want to be able to click that button really fast and produce that sound as many times as i humanly can. i currently have this up and running by including the and maybe that is where the culprit is... also, i am digging into apple's references and cannot fi...