|
by: John |
last post by:
I'm trying to write a program that's run on both Windows 98 and Linux.
I need a timer, that I can start and when it hits a limit, it needs to
call a callback function. I also need to be able to abort the timer
before it hits the limit - it's the classic timeout type thing.
I'll readily admit I'm no expert on C++, but after a trawl of the WWW
pages, there appears to be two solutions depending on whether it's Linux
or Windows.
|
by: Macgyver |
last post by:
Hi all,
does anyone know how to generate a millisecond delay in C, compiling
under Linux? I understand the function sleep() will generate a delay
down to a resolution of one second, but I need to be able to refine
this to milliseconds.
Any ideas?
Thanks in advance,
|
by: Yeounkun, Oh |
last post by:
Hello.
Sleep (x) function make a process sleep during x seconds.
but, how to sleep during milliseconds...
Pls. help me.
Thank you. Regards.
|
by: WeAreBorg |
last post by:
How can I create it?
Thanks in advance
|
by: Ty |
last post by:
I am developing a .net application using C# that requires a 1ms timer. I
have tried creating said timer by creating a timer object
(System.Timers.Timer) that is seeded with a 1ms interval. I have also tried
creating a thread with a 1ms sleep time.
The timer object that was created will only yield a resolution as low as
10ms no matter how low the interval is set.
Most of the time the thread timer yields the same 10ms resolution as the...
|
|
by: Jakub Moskal |
last post by:
Hi,
I want to write a benchmark that will measure performance of several
different algorithms for the same problem. There is a set time bound
though, the algorithm cannot run longer than n minutes.
Here is what the main program would do:
initializeVariables();
try
|
by: John |
last post by:
The table below shows the execution time for this code snippet as
measured by the unix command `time':
for i in range(1000):
time.sleep(inter)
inter execution time ideal
0 0.02 s 0 s
1e-4 4.29 s 0.1 s
1e-3 4.02 s 1 s
|
by: Hunter |
last post by:
Hi all,
I know it may sound like dump newbie question (which is very much
true, as I am a newbie, not even a real programmer), but I need to
implement a calendar time clock with a millisecond resolution. For
hours I've been digging the Visual C++ 6 help and Googling like a
madman. It seems to me that the standard C just don't have the tool to
get this type on information. Sure I found the time() and the clock()
but they don't really...
|
by: colin |
last post by:
Hi,
Im trying to time some parts of my code using the Stopwatch class,
but it is so slow, I tried the QueryPerformanceFrequency()
but this seems to be just as slow,
if I just simply call this function in a loop it takes 21 ticks
with a reported frequency of 3.5mhz
its is about 6us wich is over 12k instructions on my 2ghz cpu.
this negates the idea of having a high res timer ...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|