You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// The class intends to execute a task that need to be executed repeatedly every less than one second and need to be accurate.
18
+
/// The class intends to execute a task which needs to be executed repeatedly every less than one second accurately.
19
19
/// </summary>
20
20
/// <typeparam name="TResult">The type of the return value of the task.</typeparam>
21
21
publicclassFrameRateTaskExecutor<TResult>
22
22
{
23
23
/// <summary>
24
-
/// The actual framerate recently.
24
+
/// The current actual frame rate.
25
25
/// </summary>
26
26
publicuintFrameRate
27
27
{
@@ -62,7 +62,7 @@ private bool TrySetExecute()
62
62
63
63
privateTResultresult;
64
64
/// <summary>
65
-
/// Get the return value of this task.
65
+
/// Get the return value of the task.
66
66
/// </summary>
67
67
/// <exception cref="TaskNotFinishedException">
68
68
/// The task hasn't finished.
@@ -81,7 +81,7 @@ public TResult Result
81
81
/// Gets or sets whether it allows time exceeding.
82
82
/// </summary>
83
83
/// <remarks>
84
-
/// If this property is false, the task will throw a TimeExceed exception when the task cannot finish in the given time.
84
+
/// If it is set false, the task will throw Timothy.FrameRateTask.TimeExceedException when the task cannot finish in the given time.
85
85
/// The default value is true.
86
86
/// </remarks>
87
87
publicboolAllowTimeExceed
@@ -95,10 +95,10 @@ public bool AllowTimeExceed
95
95
}=true;
96
96
97
97
/// <summary>
98
-
/// It will be called once time exceeds if AllowTimeExceed is set true.
98
+
/// It will be called once time exceeds.
99
99
/// </summary>
100
100
/// <remarks>
101
-
/// parameter bool: If it is called because of the number of time exceeding is greater than MaxTimeExceedCount, the argument is true; if it is called because of exceeding once, the argument is false.
101
+
/// parameter bool: If it is called because of the number of time exceeding is greater than MaxTolerantTimeExceedCount, the argument is true; if it is called because of exceeding once, the argument is false.
102
102
/// </remarks>
103
103
publicAction<bool>TimeExceedAction
104
104
{
@@ -130,7 +130,7 @@ public ulong MaxTolerantTimeExceedCount
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Copy file name to clipboardExpand all lines: README.md
+47-58Lines changed: 47 additions & 58 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,54 +2,41 @@
2
2
3
3
---
4
4
5
-
## Introduction
6
-
7
-
Frame rate stabilizer, a task executor which executes tasks at a stable frame rate.
5
+
## Languages
8
6
9
-
This project intends to build an engine to support to execute tasks which need to be execute repeatedly and frequently, and the time interval between two executing need to be accurately stable. And this engine can also provide the real-time frame rate. Up to now, this time interval should be no more than 1 second. It can be used to control the framerate of a game, and control the frame rate of communication through network, etc.
This project intends to build an engine to support executing tasks which need to be executed repeatedly and frequently in a single thread, and the time interval between two execution needs to be accurately stable. And this engine can also provide the real-time frame rate. Up to now, this time interval should be no more than 1 second. It can be used to control the frame rate of a game, or communication through network, etc.
22
15
16
+
The source code is in the project `FrameRateTask`, and the example of usage is in the project `Test`.
23
17
18
+
> This project is initially written for [THUAI4](https://github.com/eesast/THUAI4) to support some functions.
24
19
25
20
## Get This Package
26
21
27
-
To get this package, please enter nuget package page: [https://www.nuget.org/packages/FrameRateTask/](https://www.nuget.org/packages/FrameRateTask/)
22
+
To get this package, please enter the nuget package page: [https://www.nuget.org/packages/FrameRateTask/](https://www.nuget.org/packages/FrameRateTask/)
0 commit comments