Mensaje
 
a
04/07/2001 00:09:33
General information
Foro:
Visual FoxPro
Category:
Miscellaneous
ID de la conversación:
00526579
ID del mensaje:
00526583
Views:
16
Hi Michel,

Try something like this:
ldStartDate = date()
ltStart = seconds()
FOR i = 1 to 1000000
   
ENDFOR &&* i = 1 to 100000
wait wind tran((date() - ldStartDate) * 60*60*24 + seconds() - ltStart, "9.99")
By the way, The WestWind logs do all this for you already don't they?

Cheers,

Andrew

>This is a strange situation I wanted to talk about. The Universal Thread is using the Visual FoxPro Seconds() function to calculate the amount of time required to process a transaction. When the transaction is completed, we issue REPLACE LAP WITH SECONDS()-gnTime where gnTime contains the Seconds() start time. So, this is usually returning 0 to 1 second lap time as this is about what it takes to process a Universal Thread transaction.
>
>Now, tonight I faced a situation where an error was returned at that line. After a few investigations, I finally found that the transaction started in the last second of the day and ended in the first second of the new day. So, I added a condition to detect if the SECONDS() is greater than gnTime in order to avoid that. But, the weird situation is that this is unlikely to happen as it requires a lot of precision. I had it about 4 times in the first 6 months of 2001. <s>


If we were to introduce Visual FoxBase+, would we be able to work from the dotNet Prompt?


From Top 22 Developer Responses to defects in Software
2. "It’s not a bug, it’s a feature."
1. "I thought I fixed that."


All my FoxTalk and other articles are available on my web site.


Unless specifically identified otherwise, anthing posted here is purely my opinion and may or may not reflect the policies or practices of Microsoft.
Previous
Next
Responder
Mapa
Ver