QPF and QPC are kernel calls which provide you with a high performance timer (usually ~1 microsecond resolution). To solve your prob to determine system uptime you would

  1.  read QueryPeformancePCounter once.
  2.  read QueryPerformanceFrequency
  3. Diviide the QPC value by QPF

Result is in seconds. Note QPC and QPF are 64 bit values. Rollover shouldn't occur in your lifetime and those calls are compatible all the way  back to Win32S.
Posted on 2005-10-09 14:37:53 by alpha
oh thanks for you good describing it works now but how do i idiv the two 64 values?
Posted on 2005-10-09 14:48:38 by lilljocke
Check out  http://www.masmforum.com/simple/index.php?topic=770.0 from MASM forum.

The attached asm source there should get you started with slight modifications.
Posted on 2005-10-09 15:02:28 by alpha

The basic assumptions appear to be inappropriate to the task you have in mind. If it is an uptime counter you hardly need high resolution so instead of using a function that is performing time checking at high intervals, why not use the system time and have a look at it one a minute. You have to do some arithmetic from the first sample you take but you don't have to rely on a single OS based counter if you use the time rater than the system tick count.
Posted on 2005-10-09 15:11:11 by hutch--
I have tryed to use GetLocalTime and GetSytemTime and compare them but it is hard i think. Do you know how to do it please show me.
Posted on 2005-10-09 15:22:56 by lilljocke
I have tryed to use GetLocalTime and GetSytemTime and compare...

That won't do what you want to do. That will give you the offset from UTC (GMT) for your timezone.

Posted on 2005-10-09 22:52:48 by Greg