473,396 Members | 1,871 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

use a timer to count the time of a period signal in millisecond.

Hi,
My name is Franck.I am learning how to program in C. How can I measure the period of a signal in Millisecond using a timer?

Basically, I am receiving two pulses from a system and I need to determine the time between them.

Thanks
Feb 6 '12 #1
3 2117
Banfa
9,065 Expert Mod 8TB
On the whole I wouldn't use a timer for that job, I would record the time of the first pulse and then record the time of the second pulse and subtract to get the difference.
Feb 6 '12 #2
donbock
2,426 Expert 2GB
The C Standard states that "the range and precision of times representable in clock_t and time_t [used by the time.h functions] are implementation-defined". You may need to look for a non-Standard operating system time function to get sufficient resolution to distinguish the two pulses.
Feb 7 '12 #3
Cheers for your replies.I'm trying to working out a program with all your informations.I'm not very good in C but I should be able to get something for tomorrow. I'll let you know. Thanks again.
Feb 8 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: CrystalDBA | last post by:
I am using SQL Server 2000. I need to query my database for all the contracts that came in during a certain time frame (user is prompted for reportingperiodid). Table - Periods Fields -...
3
by: Dave | last post by:
Hi I am hoping someone might be able to help me out with this. I am writing a helpdesk system which records agents logging in and out of the system. I need to write a stored procedure which...
1
by: blueyonder news | last post by:
Can anyone offer any advice. I was wondering whether MS SQL server offered any facilities to trigger an event after a period of time had lapsed? e.g. once a week check data and if it is out of date...
3
by: Stu | last post by:
Hi, How can you get the time accurate to the millisecond? Thanks in advance, Stu
18
by: Sven | last post by:
Hi, I found a strange behaviour when using the time() function from time.h. Sometimes when it is called, it does not show the correct time in seconds, but an initial value. This time seem to be...
1
by: dianatokatlidis | last post by:
Hello. I have 2 separate date fields in a query. One is called Effective_Date and the other is called Expiry_Date. I want to compare the time period between these 2 fields and select any records...
4
by: limnath | last post by:
Dear All, I am using Perl version v5.8.2 built for IBM AIX. I want to get the current time till the resolution of milliseconds. Now I am able to get till seconds using localtime function. Can...
1
by: ahmurad | last post by:
Dear Brothers / Xperts, I need to count time of a page upto click submit. When the user just enter the page the timer / start time is tracked . When the user submit the form then the end time is...
1
by: Charming12 | last post by:
Hi All, I am facing quite a unique problem here with DayLight saving time. I know Windows handles Daylight saving time internally to sync PC Clock . But now i need to pass the Information of...
1
by: sasasasa | last post by:
How can I loop through each date in a given time period so that I can add those dates as a column name in a table. I want to create datatable with the person's name and hours he worked in a given...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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
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
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
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...

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.