Hi there:
with these instructions
....
dim c, d as Double
c=cdbl(now)
....
d=cdbl(now)
? (d-c)*86400
....
I get values like these:
1,00000023376197
1,99999983888119
0
0
1,00000023376197
4,00000030640513
or even with interactive tests like:
b=now
a=now
? a
03/03/2006 13:19:17
? b
03/03/2006 13:19:13
? cdbl((a-b) * 60 * 60 * 24)
3,99999967776239
i.e., I always get values with no decimal part (that is, like 1 second,
2 seconds, 0, 0, 1, 4...)
I've been trying to find help at the news... with no positive result
:-(
what I intend to do is the usual chrono form, in which every time I
strike a key, I'll save in a field the timing difference between the
1st and the 2nd key stroke, and, the important thing:
show the info in format of seconds.tenths hundreths, like 15.35
Will be waiting for your help, thanks in advance 2 2885
On 3 Mar 2006 05:03:37 -0800, jv*********@hotmail.com wrote:
In these situations I always use the GetTickCount API which gives
milliseconds (though not necessarily millisecond accuracy). I would
store it in a form-level global variable:
private m_lngTickCount as Long
private sub txtTest_KeyDown()
if m_lngTickCount = 0 then
m_lngTickCount = GetTickCount()
else
debug.print "Time diff = " & GetTickCount() - m_lngTickCount & "
msec"
m_lngTickCount = GetTickCount()
end if
end sub
In a module you need to declare:
Public Declare Function GetTickCount Lib "kernel32" Alias
"GetTickCount" () As Long
-Tom. Hi there:
with these instructions
... dim c, d as Double c=cdbl(now) ... d=cdbl(now) ? (d-c)*86400 ...
I get values like these: 1,00000023376197 1,99999983888119 0 0 1,00000023376197 4,00000030640513
or even with interactive tests like:
b=now a=now ? a 03/03/2006 13:19:17 ? b 03/03/2006 13:19:13 ? cdbl((a-b) * 60 * 60 * 24) 3,99999967776239
i.e., I always get values with no decimal part (that is, like 1 second, 2 seconds, 0, 0, 1, 4...)
I've been trying to find help at the news... with no positive result :-(
what I intend to do is the usual chrono form, in which every time I strike a key, I'll save in a field the timing difference between the 1st and the 2nd key stroke, and, the important thing:
show the info in format of seconds.tenths hundreths, like 15.35
Will be waiting for your help, thanks in advance
Worked perfectly !
Thanks very much, Tom ;-) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: lawrence |
last post by:
Is there an easy way to sort a 2 dimensional array alphabetically by
the second field in each row?
Also, when I use sort() on a two dimensional array, it seems to work a
lot like...
|
by: Guy |
last post by:
JavaScript can get time, can it get milliseconds, or actually just tenths of
seconds?
Thanks for all
Guy
|
by: Guy |
last post by:
I would like to calculate the time it takes to load a picture in tenths of a
seconds. So I get the current time, load the image, and once loaded I get
the current time again.
I would like to...
|
by: Frederick Noronha \(FN\) |
last post by:
---------- Forwarded message ----------
Solutions to Everyday User Interface and Programming Problems
O'Reilly Releases "Access Cookbook, Second Edition"
Sebastopol, CA--Neither reference book...
|
by: Jaspreet |
last post by:
I was working on some database application and had this small task of
getting the second highes marks in a class. I was able to do that using
subqueries.
Just thinking what is a good way of...
|
by: bryhhh |
last post by:
I have am still learning C#, so please bear with me.
I have an application that needs to open a second form, but I need the
second form to process message loops, whilst the original form also...
|
by: tneufeld |
last post by:
I am using a ListView control to display 2 columns of data that I
populate manually. I can get the data in the first column easily
enough. its when i try to get the data in the second column...
|
by: tommyjoe |
last post by:
I am stuck. I can't get the program to show the tenths of a second correct. Any help would be appreciated! Here is the code:
Option Compare Database
Option Explicit
Private Sub Form_Timer()...
|
by: Grizlyk |
last post by:
Hello.
I am thinking: why if i will comment lines marked with '#' in the following
example, all will be compiled, else will not:
// ***********************
typedef unsigned uint;
...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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...
|
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...
|
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: 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,...
| |