M
MD
Hi
I'm porting a piece of code from C++ to C#.
This code makes automatic suspend and resume of OS in a loop (N times),
i.e. that the application N times does something, then suspends OS,
after OS resume (NOT manual, but from the timer) it returns to the
beginning of the loop etc.
In C++ the flow looks like this:
for (...)
{
// do something
CreateWaitableTimer (...)
SetWaitableTimer (...) // The last parameter (fResume) is true
SetSuspendState (...)
}
I know to make suspend in C#. The problem is with timer. How to do the
same in C#?
Thanks in advance!
I'm porting a piece of code from C++ to C#.
This code makes automatic suspend and resume of OS in a loop (N times),
i.e. that the application N times does something, then suspends OS,
after OS resume (NOT manual, but from the timer) it returns to the
beginning of the loop etc.
In C++ the flow looks like this:
for (...)
{
// do something
CreateWaitableTimer (...)
SetWaitableTimer (...) // The last parameter (fResume) is true
SetSuspendState (...)
}
I know to make suspend in C#. The problem is with timer. How to do the
same in C#?
Thanks in advance!