Using the windows command line can I time a process that I am running?
I am running a process on a windows command line, it is going to take a long time (30+ hours) and I want to know how long it takes to complete. Is there a way to do this? ...
I am running a process on a windows command line, it is going to take a long time (30+ hours) and I want to know how long it takes to complete. Is there a way to do this? ...
I'm writing a silly program in python for a friend that prints "We are the knights who say 'Ni'!". then sleeps for 3 seconds, and then prints "Ni!" twenty times at random intervals using the random module's uniform() method. Here's my code: from time import sleep import random def knights_of_ni(): generator = random.Random() pr...
Hello... at the start and end of my program, I have from time import strftime print int(strftime("%Y-%m-%d %H:%M:%S") Y1=int(strftime("%Y")) m1=int(strftime("%m")) d1=int(strftime("%d")) H1=int(strftime("%H")) M1=int(strftime("%M")) S1=int(strftime("%S")) Y2=int(strftime("%Y")) m2=int(strftime("%m")) d2=int(strftime("%d")) H2=int(...
I have a field that has time and date in following format 2010-03-26 10:06:11 What I need is that if this time is within 4 hours of current time then show but if its over 4 hour then done show this record. thanks ...
Editing the question. I have SQL like this: `table1`.`DateField` >= DATE_SUB(NOW(), INTERVAL {$days} DAY Now 24 hours make a whole day. However, what if I want to do the query for the last 3 hours or so? My table1.DateField is in the format of 2010-03-10 10:05:50. Original post: If I have this 1 hour 2 hours 3 hours .. 24 h...
I have a time column in the format of 00:00 00:30 01:00. I want to subset to certain hours but I don't understand how to convert it to the right format for the date i used as.date() is there someting similar? ...
Taking user input such as "tomorrow", "in three days", "3 months 30 days", "march 30, 2011" and interpreting it into a timestamp usable by php. I feel like I've seen something like this before in a task management system. I'd like to use it for something a little different but I can't find anything precooked anywhere. Maybe I saw it on ...
I want to know how to call a function after a certain time. I have tried time.sleep() but this halts the whole script. I want the script to carry on, but after ???secs call a function and run the other script at the same time ...
I'm working on making a small ban system, and the snippet below will tell the client how much time of their ban is remaining. The problem: When you call Bans.timeleft_str(), rather then showing something less then a day, it will show the timestamp + 18 hours. Snippet: http://pastebin.com/Zumn0tLv This problem occurs if I change self.l...
So I wanted to compare the performance of python between 2.6 and 3.1, so I wrote this simple program test.py that will perform some basic lengthy operation: from time import time start = time() q = 2 ** 1000000000 q += 3 << 1000000000 print(q.__sizeof__(), time() - start) I didn't get what I expected, since after launching the command...
It was something like cMessage I think? I can;t remember, could someone help me? ...
Hi, I am using the following code to download files from the internet: size_t write_data(void *ptr, size_t size, size_t nmemb, FILE *stream) { size_t written; written = fwrite(ptr, size, nmemb, stream); return written; } int main(int argc, char** argv) { FILE *downloaded_file; if ( (downloaded_file = fopen (download_path ...
Hey guys, I need to be able to execute either a php or jquery function to update a sql database every certain segment of time, 20 minutes for example, regardless of user activity on the website. Does anyone know the easiest way to do this? Thanks, any help is appreciated. ...
Hello. I need help with some code that i am writing for a small text rpg. Its basically a clock that simulates a day, which will be 24 minutes instead of 24 hours. 1 second will equal one minute, and 1 minute will equal one hour. The clock will start from 12:00 and go to 12:00. I need ideas on how to write this code. This is code that i ...
Hi all, I have a question regarding GetTickCount function, I have two calls to this function in my code with several commands between them and the function in both calls returns same count. i.e. var1 = GetTickCount(); code : : var2 = GetTickCount(); var1 and var2 has same values in it. can someone help? ...
Like other questions asked here, im looking to do a simple conversion of time formats. I've found answers on how to do this in Perl, but not in Python. I have a string like so: on Jun 03, 02010 at 10:22PM and I'd like to convert it to a datetime object like this: Thu, 03 Jun 2010 22:22:00 -0000 I have sliced up my input like so: ...
I have lines of the following format in a file. Summary;meeting;Description;None;DateStart;20100629T110000;DateEnd;20100629T120000;Time;20100805T084547Z I need to create a function that has two inputs: time and date in the following formats Time: HH:MM and date as mmddyyyy. (These are strings). Now the function needs to read this line...
hello.i'm newbie at web developing. i have some input form.i'm using jquery 1.4.2 inside that i have one textfield specially for input time. i want every one no need to type manually. and also make easy for every user. can you tell me how do i do that? ...
Hi! I have a table with 1 column (bus departure times in format "14:32:15"). How to querry the table to show only departures that are after the current moment (after curtime())? E.g.: if it's 12 o'clock and my table has rows (10:15:00,11:20:00,12:30:00, ...), i want to have 12:30:00 returned. ...
Hi, I'm fetching a datetime from MYSQL which looks like: 2010-08-11 11:18:28 I need to convert it into the "floor" or the earliest 15 minute interval and output in milliseconds for another function. So, this case would be: 2010-08-11 11:15:00 in milliseconds Whoops! Sorry - need to clarify - I need code that will transform it int...