-
Time in milliseconds
Hi,
I need a function returning the time (system) in milliseconds. Can you help
me???
-
Re: Time in milliseconds
Martin,
> I need a function returning the time (system) in milliseconds. Can you
help
> me???
Try Karl Peterson's timer control at http://www.mvps.org/vb/index2.html (go
to Controls, then pick either ccrpTmr or ccrpTmr6 (for VB 6.0). It's about
as easy as you can get, widely used, and the price is right.
--
L.J. Johnson, Slightly Tilted Software
Microsoft MVP (Visual Basic)
LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
<http://www.SlightlyTiltedSoftware.com>
Ask The NT Pro at <http://www.inquiry.com>
-
Re: Time in milliseconds
thanks
"L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote:
>Martin,
>
>> I need a function returning the time (system) in milliseconds. Can you
>help
>> me???
>
>Try Karl Peterson's timer control at http://www.mvps.org/vb/index2.html
(go
>to Controls, then pick either ccrpTmr or ccrpTmr6 (for VB 6.0). It's about
>as easy as you can get, widely used, and the price is right.
>
>--
>L.J. Johnson, Slightly Tilted Software
>Microsoft MVP (Visual Basic)
>LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
><http://www.SlightlyTiltedSoftware.com>
>Ask The NT Pro at <http://www.inquiry.com>
>
>
>
-
Re: Time in milliseconds
Try the following code:
Private Type SMPTE
hour As Byte
min As Byte
sec As Byte
frame As Byte
fps As Byte
dummy As Byte
pad(2) As Byte
End Type
Private Type MMTIME
wType As Long
units As Long
smpteVal As SMPTE
songPtrPos As Long
End Type
Private Declare Function timeGetSystemTime Lib "winmm.dll" (lpTime As MMTIME,
ByVal uSize As Long) As Long
Public Function GetCurrentTime() As Long
Dim mmt As MMTIME
On Error Resume Next
' return the current system time (in milliseconds)
' assign this value to wType field to
' specify time measurement in milliseconds
mmt.wType = TIME_MS
timeGetSystemTime mmt, LenB(mmt)
GetCurrentTime = mmt.units
End Function
"martin" <martin@scg.ulaval.ca> wrote:
>
>
>thanks
>
>
>"L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote:
>>Martin,
>>
>>> I need a function returning the time (system) in milliseconds. Can you
>>help
>>> me???
>>
>>Try Karl Peterson's timer control at http://www.mvps.org/vb/index2.html
>(go
>>to Controls, then pick either ccrpTmr or ccrpTmr6 (for VB 6.0). It's about
>>as easy as you can get, widely used, and the price is right.
>>
>>--
>>L.J. Johnson, Slightly Tilted Software
>>Microsoft MVP (Visual Basic)
>>LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
>><http://www.SlightlyTiltedSoftware.com>
>>Ask The NT Pro at <http://www.inquiry.com>
>>
>>
>>
>
-
Re: Time in milliseconds
Thanks Cody,
But what is the value for TIME_MS in function GetCurrentTime
When i try this code i receive a compile error because this variable is not
defined
"Cody Laird" <cody.laird@suntrust.com> wrote:
>
>Try the following code:
>
>Private Type SMPTE
> hour As Byte
> min As Byte
> sec As Byte
> frame As Byte
> fps As Byte
> dummy As Byte
> pad(2) As Byte
>End Type
>
>Private Type MMTIME
> wType As Long
> units As Long
> smpteVal As SMPTE
> songPtrPos As Long
>End Type
>
>Private Declare Function timeGetSystemTime Lib "winmm.dll" (lpTime As MMTIME,
>ByVal uSize As Long) As Long
>
>Public Function GetCurrentTime() As Long
> Dim mmt As MMTIME
>
> On Error Resume Next
>
> ' return the current system time (in milliseconds)
>
> ' assign this value to wType field to
> ' specify time measurement in milliseconds
> mmt.wType = TIME_MS
> timeGetSystemTime mmt, LenB(mmt)
> GetCurrentTime = mmt.units
>End Function
>
>"martin" <martin@scg.ulaval.ca> wrote:
>>
>>
>>thanks
>>
>>
>>"L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote:
>>>Martin,
>>>
>>>> I need a function returning the time (system) in milliseconds. Can
you
>>>help
>>>> me???
>>>
>>>Try Karl Peterson's timer control at http://www.mvps.org/vb/index2.html
>>(go
>>>to Controls, then pick either ccrpTmr or ccrpTmr6 (for VB 6.0). It's about
>>>as easy as you can get, widely used, and the price is right.
>>>
>>>--
>>>L.J. Johnson, Slightly Tilted Software
>>>Microsoft MVP (Visual Basic)
>>>LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
>>><http://www.SlightlyTiltedSoftware.com>
>>>Ask The NT Pro at <http://www.inquiry.com>
>>>
>>>
>>>
>>
>
-
Re: Time in milliseconds
Sorry: (the old cut and paste gotcha!)
Private Const TIME_MS as Long = 1
Cody
"martin" <martin.nadeau@scg.ulaval.ca> wrote:
>
>Thanks Cody,
>
>But what is the value for TIME_MS in function GetCurrentTime
>When i try this code i receive a compile error because this variable is
not
>defined
>
>
>
>"Cody Laird" <cody.laird@suntrust.com> wrote:
>>
>>Try the following code:
>>
>>Private Type SMPTE
>> hour As Byte
>> min As Byte
>> sec As Byte
>> frame As Byte
>> fps As Byte
>> dummy As Byte
>> pad(2) As Byte
>>End Type
>>
>>Private Type MMTIME
>> wType As Long
>> units As Long
>> smpteVal As SMPTE
>> songPtrPos As Long
>>End Type
>>
>>Private Declare Function timeGetSystemTime Lib "winmm.dll" (lpTime As MMTIME,
>>ByVal uSize As Long) As Long
>>
>>Public Function GetCurrentTime() As Long
>> Dim mmt As MMTIME
>>
>> On Error Resume Next
>>
>> ' return the current system time (in milliseconds)
>>
>> ' assign this value to wType field to
>> ' specify time measurement in milliseconds
>> mmt.wType = TIME_MS
>> timeGetSystemTime mmt, LenB(mmt)
>> GetCurrentTime = mmt.units
>>End Function
>>
>>"martin" <martin@scg.ulaval.ca> wrote:
>>>
>>>
>>>thanks
>>>
>>>
>>>"L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote:
>>>>Martin,
>>>>
>>>>> I need a function returning the time (system) in milliseconds. Can
>you
>>>>help
>>>>> me???
>>>>
>>>>Try Karl Peterson's timer control at http://www.mvps.org/vb/index2.html
>>>(go
>>>>to Controls, then pick either ccrpTmr or ccrpTmr6 (for VB 6.0). It's
about
>>>>as easy as you can get, widely used, and the price is right.
>>>>
>>>>--
>>>>L.J. Johnson, Slightly Tilted Software
>>>>Microsoft MVP (Visual Basic)
>>>>LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
>>>><http://www.SlightlyTiltedSoftware.com>
>>>>Ask The NT Pro at <http://www.inquiry.com>
>>>>
>>>>
>>>>
>>>
>>
>
-
Re: Time in milliseconds
Martin,
> I need a function returning the time (system) in milliseconds. Can you
help
> me???
Try Karl Peterson's timer control at http://www.mvps.org/vb/index2.html (go
to Controls, then pick either ccrpTmr or ccrpTmr6 (for VB 6.0). It's about
as easy as you can get, widely used, and the price is right.
--
L.J. Johnson, Slightly Tilted Software
Microsoft MVP (Visual Basic)
LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
<http://www.SlightlyTiltedSoftware.com>
Ask The NT Pro at <http://www.inquiry.com>
-
Re: Time in milliseconds
thanks
"L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote:
>Martin,
>
>> I need a function returning the time (system) in milliseconds. Can you
>help
>> me???
>
>Try Karl Peterson's timer control at http://www.mvps.org/vb/index2.html
(go
>to Controls, then pick either ccrpTmr or ccrpTmr6 (for VB 6.0). It's about
>as easy as you can get, widely used, and the price is right.
>
>--
>L.J. Johnson, Slightly Tilted Software
>Microsoft MVP (Visual Basic)
>LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
><http://www.SlightlyTiltedSoftware.com>
>Ask The NT Pro at <http://www.inquiry.com>
>
>
>
-
Re: Time in milliseconds
Try the following code:
Private Type SMPTE
hour As Byte
min As Byte
sec As Byte
frame As Byte
fps As Byte
dummy As Byte
pad(2) As Byte
End Type
Private Type MMTIME
wType As Long
units As Long
smpteVal As SMPTE
songPtrPos As Long
End Type
Private Declare Function timeGetSystemTime Lib "winmm.dll" (lpTime As MMTIME,
ByVal uSize As Long) As Long
Public Function GetCurrentTime() As Long
Dim mmt As MMTIME
On Error Resume Next
' return the current system time (in milliseconds)
' assign this value to wType field to
' specify time measurement in milliseconds
mmt.wType = TIME_MS
timeGetSystemTime mmt, LenB(mmt)
GetCurrentTime = mmt.units
End Function
"martin" <martin@scg.ulaval.ca> wrote:
>
>
>thanks
>
>
>"L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote:
>>Martin,
>>
>>> I need a function returning the time (system) in milliseconds. Can you
>>help
>>> me???
>>
>>Try Karl Peterson's timer control at http://www.mvps.org/vb/index2.html
>(go
>>to Controls, then pick either ccrpTmr or ccrpTmr6 (for VB 6.0). It's about
>>as easy as you can get, widely used, and the price is right.
>>
>>--
>>L.J. Johnson, Slightly Tilted Software
>>Microsoft MVP (Visual Basic)
>>LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
>><http://www.SlightlyTiltedSoftware.com>
>>Ask The NT Pro at <http://www.inquiry.com>
>>
>>
>>
>
-
Re: Time in milliseconds
Thanks Cody,
But what is the value for TIME_MS in function GetCurrentTime
When i try this code i receive a compile error because this variable is not
defined
"Cody Laird" <cody.laird@suntrust.com> wrote:
>
>Try the following code:
>
>Private Type SMPTE
> hour As Byte
> min As Byte
> sec As Byte
> frame As Byte
> fps As Byte
> dummy As Byte
> pad(2) As Byte
>End Type
>
>Private Type MMTIME
> wType As Long
> units As Long
> smpteVal As SMPTE
> songPtrPos As Long
>End Type
>
>Private Declare Function timeGetSystemTime Lib "winmm.dll" (lpTime As MMTIME,
>ByVal uSize As Long) As Long
>
>Public Function GetCurrentTime() As Long
> Dim mmt As MMTIME
>
> On Error Resume Next
>
> ' return the current system time (in milliseconds)
>
> ' assign this value to wType field to
> ' specify time measurement in milliseconds
> mmt.wType = TIME_MS
> timeGetSystemTime mmt, LenB(mmt)
> GetCurrentTime = mmt.units
>End Function
>
>"martin" <martin@scg.ulaval.ca> wrote:
>>
>>
>>thanks
>>
>>
>>"L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote:
>>>Martin,
>>>
>>>> I need a function returning the time (system) in milliseconds. Can
you
>>>help
>>>> me???
>>>
>>>Try Karl Peterson's timer control at http://www.mvps.org/vb/index2.html
>>(go
>>>to Controls, then pick either ccrpTmr or ccrpTmr6 (for VB 6.0). It's about
>>>as easy as you can get, widely used, and the price is right.
>>>
>>>--
>>>L.J. Johnson, Slightly Tilted Software
>>>Microsoft MVP (Visual Basic)
>>>LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
>>><http://www.SlightlyTiltedSoftware.com>
>>>Ask The NT Pro at <http://www.inquiry.com>
>>>
>>>
>>>
>>
>
-
Re: Time in milliseconds
Sorry: (the old cut and paste gotcha!)
Private Const TIME_MS as Long = 1
Cody
"martin" <martin.nadeau@scg.ulaval.ca> wrote:
>
>Thanks Cody,
>
>But what is the value for TIME_MS in function GetCurrentTime
>When i try this code i receive a compile error because this variable is
not
>defined
>
>
>
>"Cody Laird" <cody.laird@suntrust.com> wrote:
>>
>>Try the following code:
>>
>>Private Type SMPTE
>> hour As Byte
>> min As Byte
>> sec As Byte
>> frame As Byte
>> fps As Byte
>> dummy As Byte
>> pad(2) As Byte
>>End Type
>>
>>Private Type MMTIME
>> wType As Long
>> units As Long
>> smpteVal As SMPTE
>> songPtrPos As Long
>>End Type
>>
>>Private Declare Function timeGetSystemTime Lib "winmm.dll" (lpTime As MMTIME,
>>ByVal uSize As Long) As Long
>>
>>Public Function GetCurrentTime() As Long
>> Dim mmt As MMTIME
>>
>> On Error Resume Next
>>
>> ' return the current system time (in milliseconds)
>>
>> ' assign this value to wType field to
>> ' specify time measurement in milliseconds
>> mmt.wType = TIME_MS
>> timeGetSystemTime mmt, LenB(mmt)
>> GetCurrentTime = mmt.units
>>End Function
>>
>>"martin" <martin@scg.ulaval.ca> wrote:
>>>
>>>
>>>thanks
>>>
>>>
>>>"L.J. Johnson" <LJJohnson@SlightlyTiltedSoftware.com> wrote:
>>>>Martin,
>>>>
>>>>> I need a function returning the time (system) in milliseconds. Can
>you
>>>>help
>>>>> me???
>>>>
>>>>Try Karl Peterson's timer control at http://www.mvps.org/vb/index2.html
>>>(go
>>>>to Controls, then pick either ccrpTmr or ccrpTmr6 (for VB 6.0). It's
about
>>>>as easy as you can get, widely used, and the price is right.
>>>>
>>>>--
>>>>L.J. Johnson, Slightly Tilted Software
>>>>Microsoft MVP (Visual Basic)
>>>>LJJohnson@SlightlyTiltedSoftware.com or LJJohnson@mvps.org
>>>><http://www.SlightlyTiltedSoftware.com>
>>>>Ask The NT Pro at <http://www.inquiry.com>
>>>>
>>>>
>>>>
>>>
>>
>
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
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|