LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-09-2018, 06:03 PM   #1
pramodkotwal
LQ Newbie
 
Registered: Feb 2018
Posts: 2

Rep: Reputation: Disabled
Elapsed time in milliseconds between two input signals.


I am using an optical reflective sensor and a Raspberry Pi using Python or C (whichever is faster) to measure RPM. So I need to measure elapsed time in milliseconds between two signals on an GPIO pin. Will appreciate help.
 
Old 02-09-2018, 07:43 PM   #2
Sefyir
Member
 
Registered: Mar 2015
Distribution: Linux Mint
Posts: 634

Rep: Reputation: 316Reputation: 316Reputation: 316Reputation: 316
What have you written so far?

As for measuring how long something took in python, you can use time.time() and taking the difference of two logged values, each one taken after a input signal.
 
Old 02-17-2018, 07:16 AM   #3
pramodkotwal
LQ Newbie
 
Registered: Feb 2018
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Time in milliseconds linuxromeo Linux - Newbie 6 06-25-2010 07:22 AM
Get elapsed time HarryBoy Programming 2 08-08-2008 06:13 AM
Current time in milliseconds charubcl Linux - Newbie 2 08-08-2008 05:28 AM
Time in milliseconds davidguygc Programming 2 04-25-2007 06:03 PM
diff. between elapsed time and cpu time madhugp Linux - General 1 01-15-2007 07:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration