hi, i have a program that saves data to file and i want to put a time stamp of the current date/time on that log but when i try to write the time to the file it will not show up but the other data i write will.
#include <iostream>
#include <windows.h>
#include <fstream>
#include <string>
#include <sstream>
#include <direct.h>
#include <...
Is there a windows API that would achieve the equivalent of cliking the "Update now" button in the "Date and time properties"/"Internet time" tab (opened by double clicking the clock in the taskbar)?
Is there a way to monitor when the time syncronization is trigered by windows and when it succeeds or fails?
...
Hi !
I would like to know how to log the login and logout of a user : it would be a mean to measure how much time someone has been connected in a month so far.
I know it's possible to use the command "last". But this command is based on a file that has a r/w permission for the user, hence the possibility to change these data.
I would l...
Im passing function GetCurrentDate() the pointer to a tm struct.
Within that function I printf the uninitialized data, then the initialized. Expected results.
However when i return the tm struct appears uninitialized.
See console output bellow. What am i doing wrong?
uninitialized date:??? ???-1073908332
01:9448278:-1073908376 -...
I know that you can specify how long you want an object cached in memcache, however I setup memcache with Zend's Zend_Cache and there does not appear to be documentation related to how long the item stays in cache.
Anyone know how to do this?
...
UK is currently 1 hour ahead of UTC due to Daylight Savings Time. When I check the Daylight Bias value from GetTimeZoneInformation it is currently -60. Does that mean that translating UTC to DST means DST = UTC + -1 * DaylightBias, ie negate and add?
I thought in this case for instance adding Daylight Bias to UTC is the correct operatio...
HI I am a new java programmer (very new).
What I want to do/test is (not sure if its recommendable or doable?), we know that
System.out.println("Message");
will output the "Message" in command prompt. Is it possible to display the current time, without having to repeatly use the system.out.println()?
Name, like instead of displayin...
Hi,
How can I find difference between two time intervals.
Like 13:45:26.836 - 14:24:18.473 which is of the format "Hour:Min:Sec:Millisecs". Now i need to find the time difference between these two times.
How can i do this in C#.?
Thanks in advance.
...
I'm currently storing various metadata about videos and one of those bits of data is the length of a video.
So if a video is 10 minutes 35 seconds long, it's saved as "10:35" in the database.
But what I'd like to do is retrieve a listing of videos by length (longest first, shortest last).
The problem I'm having is that if a video is "...
Hi!
SOAP client return seconds to end event.
How can I get from this seconds date in format "yyy-mm-dd hh:ii:ss"
...
First question. Be gentle.
I'm working on software that tracks technicians' time spent working on tasks. The software needs to be enhanced to recognize different billable rate multipliers based on the day of the week and the time of day. (For example, "Time and a half after 5 PM on weekdays.")
The tech using the software is only requi...
I have been having trouble getting IE to recognize the new Time tag in this context. This all works great in FF.
Here is the code:
var origComment = $('.articleComment:first div');
if (origComment.length > 0) {
var commentHtml = origComment.clone(true);
commentHtml.find('time').text('today');
var html = '<article class="' + ((side == 'L...
hello all,
I m making an app which requires remote databse connection. I want the values in picker from database but when I click on button to invoke picker it takes some time to fetch the values and displaying. Is there any way to do it fast?
and also is there any way to reduce the time of transition between 2 views?
Thanx
...
Probably a stupid question, but I couldn't find anything searching...
Is there a standard header that allows me to fetch the current time? Otherwise is there some cross-platform alternative?
...
Android doesn't appear to provide a way for a user application to change the system time. What I would like to do instead is to get the user to change the time. It is easy to open up the Date & Time settings:
startActivity(new Intent(android.provider.Settings.ACTION_DATE_SETTINGS));
What I would like to know is:
Is it possible to li...
After noticing some timing descrepencies with events in my code, I boiled the problem all the way down to my Windows Message Loop.
Basically, unless I'm doing something strange, I'm experiencing this behaviour:-
MSG message;
while (PeekMessage(&message, _applicationWindow.Handle, 0, 0, PM_REMOVE))
{
int timestamp = timeGetTime();
...
Quick question: One can set the path where a cookie is valid, but is it also possible to get (read) this path from the cookie (in PHP)?
Or else: is it possible to extend a cookie's time, without knowing what path it's on (but keeping the path the same)?
...
Hi, I was suggested when I have some further questions on my older ones, to create newer Question and refer to old one. So, this is the original question: What is the C runtime library?
OK, from your answers, I now get thet statically linked libraries are Microsoft implementation of C standard functions. Now:
If I get it right, the sch...
I am trying to use time() to measure various points of my program.
What I don't understand is why the values in the before and after are the same? I understand this is not the best way to profile my program, I just want to see how long something take.
printf("**MyProgram::before time= %ld\n", time(NULL));
doSomthing();
doSomthingLo...
Hey,
I'm running a function which evaluates commands passed in using stdin and another function which runs a bunch of jobs. I need to make the latter function sleep at regular intervals but that seems to be blocking the stdin. Any advice on how to resolve this would be appreciated.
The source code for the functions is
def runJobs(comp...