-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
snltty
committed
Sep 27, 2024
1 parent
3815546
commit 40e8575
Showing
43 changed files
with
952 additions
and
313 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ jobs: | |
release_name: v1.4.4.${{ steps.date.outputs.today }} | ||
draft: false | ||
prerelease: false | ||
body: 1. 增加流量统计(暂时显示服务端流量) | ||
body: "1. 总览,和详细流量统计,一眼知道服务器流量花在哪里\r\n2. 优化信标。减少流量,没有操作时尽量不产生流量" | ||
- name: upload-win-x86-oss | ||
id: upload-win-x86-oss | ||
uses: tvrcgo/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using System; | ||
|
||
namespace linker.libs | ||
{ | ||
public sealed class LastTicksManager | ||
{ | ||
private long ticks = Environment.TickCount64; | ||
|
||
public void Update() | ||
{ | ||
ticks = Environment.TickCount64; | ||
} | ||
public bool Less(long ms) | ||
{ | ||
return Environment.TickCount64 - ticks <= ms; | ||
} | ||
public bool Greater(long ms) | ||
{ | ||
return Environment.TickCount64 - ticks > ms; | ||
} | ||
public bool Equal(long ms) | ||
{ | ||
return ticks == ms; | ||
} | ||
public bool NotEqual(long ms) | ||
{ | ||
return ticks != ms; | ||
} | ||
|
||
public long Diff() | ||
{ | ||
return Environment.TickCount64 - ticks; | ||
} | ||
public bool Timeout(long ms) | ||
{ | ||
return ticks == 0 || Environment.TickCount64 - ticks > ms; | ||
} | ||
public void Clear() | ||
{ | ||
ticks = 0; | ||
} | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.