473,480 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to convert from Ticks to date&time?

We only know the system ticks count, but we have no date or time function.

So we need the source code about solving the problem. I have googled several
times and no good results. can u help me?

Thanks in advance.
Nov 14 '05 #1
4 5628
On Mon, 20 Jun 2005 13:14:12 +0800, in comp.lang.c , "David"
<52****@crscd.com.cn> wrote:
We only know the system ticks count, but we have no date or time function.
CLOCKS_PER_SEC might be useful. Bear in mind that system ticks may not
represent wall-clock time, but CPU time.
So we need the source code about solving the problem. I have googled several
times and no good results.


Once you have it in seconds, the rest is easy.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 14 '05 #2
David wrote:
We only know the system ticks count, but we have no date or time function.

So we need the source code about solving the problem. I have googled several
times and no good results. can u help me?

Unless you have a system function which quotes tick rate, you must use a
test loop to calibrate it yourself.

If you don't have a C implementation sufficient to provide time of day
information, you are far outside the scope of the newsgroup.
Nov 14 '05 #3


Tim Prince wrote:
David wrote:
We only know the system ticks count, but we have no date or time function.

So we need the source code about solving the problem. I have googled several
times and no good results. can u help me?


Unless you have a system function which quotes tick rate, you must use a
test loop to calibrate it yourself.

If you don't have a C implementation sufficient to provide time of day
information, you are far outside the scope of the newsgroup.


A "freestanding environment" (section 5.1.2.1) need not
provide a complete library implementation.

The O.P.'s fundamental problem is that he hasn't specified
what a "system tick" is. If it's a regularly-changing count
with a known zero point, conversion to human-readable form is
fairly straightforward. If it's a regularly-changing count
whose zero is not fixed (e.g., "most recent power-up"), the
conversion is impossible without further information. If it's
some more exotic quantity ("number of instruction issues since
power-up"), the conversion may be impossible altogether.

So, O.P.: What's a "system tick?" Something that carries
"system Lyme disease?"

--
Er*********@sun.com

Nov 14 '05 #4
Eric Sosman <er*********@sun.com> wrote:
So, O.P.: What's a "system tick?" Something that carries
"system Lyme disease?"


Probably related to a network leech...

Richard
Nov 14 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3894
by: Funnyweb | last post by:
I have just notices that the date() function is not returning the correct date/time on my "server". I am running apache2 on my winxp pro laptop. My system clock is set to the correct date,...
2
3062
by: Tim Williams (gmail) | last post by:
Using zipfile.Zipfile How can I add a file to a zip file and keep its date and time correct? Currently the date/time change to the time the file was added to the zip. Zipinfo doesn't have a...
3
2415
by: Atreju | last post by:
I have the need to import logs into an Access table. The first field is a date & time field, represented in this example: 05/15/2004 17:58:55.336 This is how the logs are reported. DateTime....
1
1631
by: LL | last post by:
Hi, How to get the current Date & Time? Date() & Time() ? Thanks.
1
1501
by: John | last post by:
Hi I am using and access datetime field to store both date & time. How can I split it into date & time after reading the field and then combine the date & time back into datetime when storing...
2
1286
by: Bill Nguyen | last post by:
I receive data in an XML file with the following date/time format. While I can parse the date & time using string function, I would like to know if this is some sort of datetime in SQLserver that I...
6
13575
by: Mike Charney | last post by:
Is there a way to check a files date and time stamp from VBA in access. I have a need check a date stamp on a file that I am importing. Thanks in advance, Mike m charney at dunlap hospital...
4
2799
by: Terry | last post by:
I have a TextBox with a date such as 15/01/2006 which I want to cast into a variable as a short date 15/01/06, also I need to cast a time such as 07:30 A.M. into a variable as a short time. What...
3
5242
by: Magesh | last post by:
How date-time attributes of a file are represented in the structure "struct stat"? Coz as I noted they found to be unsigned integers and I donno how they are interpreted as date & time in the...
7
3097
by: Rob Nicholson | last post by:
Not sure if this is a good place to post, but we're trying to reverse engineer an Oracle database which has two fields for date & time. They don't seem to be encoded using the standard Oracle...
0
7041
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7080
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
6908
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4772
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4478
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
2994
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2980
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
561
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
178
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.