-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove i-nex-cpusage. Add MCPUSAGE.module. Convert from C to Gambas lang
- Loading branch information
Showing
10 changed files
with
158 additions
and
1,464 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
' Gambas module file | ||
|
||
Public Sub _inits() | ||
Dim sLine As String | ||
Dim iPos As Integer | ||
Dim SUptime As String | ||
Dim SIdle As String | ||
Dim UPTIME_FILE As File | ||
|
||
If IsNull(UPTIME_FILE) = True Then | ||
UPTIME_FILE = Open "/proc/uptime" | ||
Endif | ||
|
||
For Each sLine In UPTIME_FILE.Lines | ||
sLine = Trim(sLine) | ||
If Not sLine Then Continue | ||
Print Left$(sLine, (InStr(sLine, ".") - 1)) / 60 | ||
Print Left$(sLine, (InStr(sLine, ".") - 1)) / 60 / 60 | ||
Print (4319 / 60) / 60 | ||
Next | ||
'Print Time(00, 00, 3600) | ||
Close #UPTIME_FILE | ||
'awk '{printf("%d:%02d:%02d:%02d",($1/60/60/24),($1/60/60%24),($1/60%60),($1%60))}' /proc/uptime | ||
|
||
End |
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.