473,503 Members | 2,238 Online
Bytes | Software Development & Data Engineering Community
+ 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 5631
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
3895
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
3064
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
2417
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
1502
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
1287
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
13579
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
2804
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
5248
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
3100
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
7207
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
7012
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7468
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...
0
5598
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3180
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
3171
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1522
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
748
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
402
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.