V
V
vision-bk2015-09-29 23:14:31
Programming
vision-bk, 2015-09-29 23:14:31

How to set the execution time of a thread (c#)?

There is a flow, in it, for example, you need to calculate the power of two, with a step of changing the degree. The number of times this operation is performed is not known, but the time period during which this flow must be performed is given. How can I set the time for a thread?
The whole program code is not needed, I just want to know how to programmatically set the execution time of a thread.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
wkololo_4ever, 2015-09-29
@vision-bk

Timer with CancelToken

A
AxisPod, 2015-09-30
@AxisPod

Pick BackgroundWorker.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question