|
-
Apr 14th, 2006, 11:34 AM
#1
Thread Starter
Fanatic Member
Measuring ?elapsed? time
ok I am making a program that will allow someone to skip to a certain part of an audio file without having to listen to the whole thing to get there, like a bible chapter has many verses, so in order to get to the verse you are looking for I have to create a program that while the audio runs I press, (lets say - enter) everytime a new verse starts. When I press enter I want to log the number of milliseconds that verse was then the next verse log the number of milliseconds...
All I need to know how to do is set up a mostly accurate timing system so I can retreive the milliseconds...
Software languages known:
Qbasic - TI-Basic - Liberty Basic - Visual Basic 6
Software API's known:
Directx 7 and 8
Internet languages, in the process of learning:
HTML - JAVASCRIPT - PHP - CSS - MYSQL - AJAX
-
Apr 14th, 2006, 12:07 PM
#2
Re: Measuring ?elapsed? time
Take a look at the Time code using GetTickCount link in my signature.
-
Apr 14th, 2006, 12:11 PM
#3
Thread Starter
Fanatic Member
Re: Measuring ?elapsed? time
i did, what does that return? milliseconds?
Software languages known:
Qbasic - TI-Basic - Liberty Basic - Visual Basic 6
Software API's known:
Directx 7 and 8
Internet languages, in the process of learning:
HTML - JAVASCRIPT - PHP - CSS - MYSQL - AJAX
-
Apr 14th, 2006, 12:14 PM
#4
Re: Measuring ?elapsed? time
-
Apr 14th, 2006, 12:17 PM
#5
Thread Starter
Fanatic Member
Re: Measuring ?elapsed? time
oh ok it works good, i did notice when I refreshed the milliseconds every second using a timer it was like 1 or 2 milliseconds off each time, now do you think that is the timers fault or the gettickcount?
Software languages known:
Qbasic - TI-Basic - Liberty Basic - Visual Basic 6
Software API's known:
Directx 7 and 8
Internet languages, in the process of learning:
HTML - JAVASCRIPT - PHP - CSS - MYSQL - AJAX
-
Apr 14th, 2006, 12:19 PM
#6
Re: Measuring ?elapsed? time
The timer is only accurate to about 40ms.
-
Apr 14th, 2006, 12:21 PM
#7
Re: Measuring ?elapsed? time
Use the QueryPerformanceCounter API as its more accurate then GetTickCount.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 14th, 2006, 12:21 PM
#8
Thread Starter
Fanatic Member
Re: Measuring ?elapsed? time
ok the reason i ask is because i am going to be timming very long audio and if down the road it was a second off, that would be bad... But looks like it should work, thanks alot!
Good rep for you! I owe you one anyway, well actually like 12, man you got alot of rep power!
Software languages known:
Qbasic - TI-Basic - Liberty Basic - Visual Basic 6
Software API's known:
Directx 7 and 8
Internet languages, in the process of learning:
HTML - JAVASCRIPT - PHP - CSS - MYSQL - AJAX
-
Apr 14th, 2006, 12:21 PM
#9
Thread Starter
Fanatic Member
Re: Measuring ?elapsed? time
 Originally Posted by RobDog888
Use the QueryPerformanceCounter API as its more accurate then GetTickCount. 
Ok can you help? How would I? If you dont mind assisting...
Software languages known:
Qbasic - TI-Basic - Liberty Basic - Visual Basic 6
Software API's known:
Directx 7 and 8
Internet languages, in the process of learning:
HTML - JAVASCRIPT - PHP - CSS - MYSQL - AJAX
-
Apr 14th, 2006, 12:29 PM
#10
Re: Measuring ?elapsed? time
Sorry, I am only checking in before heading out for the morning/day. I remembered the API from Jacob Roman, I think it was, that used it to prove that the "With" block vb function as slower then the fully qualified object. There should be some code examples already on the forums using it but here is the example from allapi.net - http://www.allapi.net/apilist/QueryP...eCounter.shtml
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 14th, 2006, 12:32 PM
#11
Thread Starter
Fanatic Member
Re: Measuring ?elapsed? time
k thanks, i actually found that same code here on the forums also, I look into it...
Software languages known:
Qbasic - TI-Basic - Liberty Basic - Visual Basic 6
Software API's known:
Directx 7 and 8
Internet languages, in the process of learning:
HTML - JAVASCRIPT - PHP - CSS - MYSQL - AJAX
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|