I would like to have a Makefile target that gets rebuilt only if the target file is older than some time interval.
As an example, say that I have some way of generating a key that is valid for one day, but generating it takes a non-trivial amount of time. I could just regenerate it each time I needed it:
.PHONY: key
key:
sleep 5 &...
So I have two dates YYYY-MM-DD and ZZZZ-NN-EE
How can I find out how many seconds there are between them?
...
I've run into a strange timewarp while doing some math with time, and it has left me stumped. Or, well, I've found the reason (or atleast a plausible one), but don't quite know what to do about it, or if there is indeed anything that can be done.
The issue in plain words is, that when adding time in larger units than 1 week (it's multip...
Hello,
I'd like to write a java while loop that will iterate for 15 seconds. One way I thought to do this would be to store the current system time + 15sec and then compare that to the current time in the while loop signature.
Is there a better way?
Thanks!
...
I'm having trouble calculating a time (hours:minutes) difference between three time values presented as HH:mm strings.
I'm calculating time worked in a day from time in, lunch time and time out.
e.g.
var time_worked = time_out - lunch - time_in
or 07:00 = 17:00 - 01:00 - 09:00
I'm familiar with the php dates but the javascript date o...
I'm trying to create an updating clock in Javascript. Everything is working correctly as I step through the debugger, except that it's not actually updating the span. Any ideas why?
<script type="text/javascript">
// The following line of code is in a setInterval()
// time is set correctly, according to my debugger
document.getElement...
Hi,
I have created a table in oracle XE, and I have a field with type date. I would like if possible when I insert a row, that it automatically fills that field with the current date from the system.
I am inserting the rows from the SQL prompt.
Thanks
...
Hey,
The problem is when I use time in shell I get output like that:
1.350u 0.038s 0:01.45 95.1% 0+0k 0+72io 1pf+0w
And when Im using it in script I get:
real 0m1.253s
user 0m1.143s
sys 0m0.047s
I mean why? And in shell script at the beginning I write:
#!/bin/bash
...
Is there is way in which one can represent a time only value in .NET without the date? For example, indicating the opening time of a shop?
TimeSpan indicates a range, whereas I only want to store a time value. Using DateTime to indicate this would result in new DateTime(1,1,1,8,30,0) which is not really desirable.
...
I want to display time in textbox or in something like a numericupdownextender used in AJAX so that the user can change time as he desires..
i have used the control to show numbers and increase accordingly..
is there a way to do this..
new code but not what is desired...
<asp:TextBox runat="server" ID="txtHour"></asp:TextBox>
<ajaxT...
I have a list of video segment durations I need to add up to get the total duration.
The series is like this:
0:33
4:30
6:03
2:10
...etc
I need to add up the minutes and seconds to get a total video duration.
Here's the modified function of my accepted answer:
function getTotalDuration ($durations) {
$total = 0;
foreach...
I am trying to create a javascript function with regular expression to validate and format the time 24 hours, accepting times without semicolon and removing spaces.
Examples:
If the user types "0100", " 100" or "100 " it would be accepted but formatted to "01:00"
If the user types "01:00" it would be accepted, with no need to format.
Th...
Hi again fellas!
Found the following snippet online and are currently using it in my web application, however it returns time like "0:5:1". I would like it to format the output like a real date, ie: 00:05:01.
Guess that there is an embarrassing quick solution to solve this. Here comes the snippet:
function getTimeDifference($start, $e...
Hi,
I would like to store the current time as an integer, re perl. I know I need a TimeSpan, starting from windows time start. I know windows time starts from when?, Jan 1st, 1601.
scope_creep
...
I have the following sql statement:
start_time = ADDDATE(start_time, INTERVAL $minuteDelta MINUTE),
end_time = ADDDATE(end_time, INTERVAL $minuteDelta MINUTE)
start_time and end_time are both time fields in my database (not datetime)
$minuteDelta is 60 for argument's sake
Right now it doesn't throw an error but resets my time fie...
-(void)viewWillAppear:(BOOL)animated
{
AppDelegate *appDelegate = (AppDelegate *) [ [UIApplication sharedApplication] delegate];
List = [appDelegate getList];
}
Here getList is a method that gets the 29000 number of list from the sqlite3 database.I am getting the list but it takes very huge time to respond in the device. Is ...
I am using CakePHP 1.2 for building a website. The problem i am facing is when ever a page loads it takes a lot of time in "waiting for www.example.com". The server response time is very slow. First i thot it was my database queries, but they were executing in less than seconds time. Next i also contacted the server people. They told it ...
Calendar calendar = Calendar.getInstance();
calendar.setTimeInMillis(0);
This sets it to the deafult value. How do I set it to zero?
...
how in lamp (LINUX ,APACHE ,MYSQL ,PHP) environment ,
can i show date and time in web page according to the user time zone ?
THANKS
...
I have an online website portfolio and I want to put their the current time in our country and also I want to put the weather update there. If my clients browse it they will see the time in our country.
My question is:
What script should I used?
Example: I live in Philippines so thats GMT+08:00
Then, when someone browse my website from...