15 minutes, bit better messages
This commit is contained in:
parent
a339cb5ed5
commit
c1d0b2403b
3 changed files with 8 additions and 8 deletions
|
|
@ -10,7 +10,7 @@
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#define RUNTIME (35*60)
|
#define RUNTIME (15*60)
|
||||||
|
|
||||||
|
|
||||||
typedef void (*pFunc)(void);
|
typedef void (*pFunc)(void);
|
||||||
|
|
@ -46,11 +46,11 @@ int main(int argc, char* argv[])
|
||||||
while (accumTime < runTime) {
|
while (accumTime < runTime) {
|
||||||
for (i = 0; i < 10; i++)
|
for (i = 0; i < 10; i++)
|
||||||
count();
|
count();
|
||||||
printf("1. sleeping...\n");
|
/* printf("1. sleeping...\n"); */
|
||||||
sleep(1);
|
sleep(1);
|
||||||
for (i = 0; i < 10; i++)
|
for (i = 0; i < 10; i++)
|
||||||
status();
|
status();
|
||||||
printf("2. sleeping...\n");
|
/* printf("2. sleeping...\n"); */
|
||||||
sleep(1);
|
sleep(1);
|
||||||
occupiedMem();
|
occupiedMem();
|
||||||
accumTime = time((time_t*)0) - startTime;
|
accumTime = time((time_t*)0) - startTime;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ discard """
|
||||||
import times
|
import times
|
||||||
import os
|
import os
|
||||||
|
|
||||||
const RUNTIME = 35 * 60 # 35 minutes
|
const RUNTIME = 15 * 60 # 15 minutes
|
||||||
|
|
||||||
when defined(windows):
|
when defined(windows):
|
||||||
const dllname = "./shared.dll"
|
const dllname = "./shared.dll"
|
||||||
|
|
|
||||||
|
|
@ -45,17 +45,17 @@ proc status() {.exportc: "status", dynlib.} =
|
||||||
var a = getComm1Status()
|
var a = getComm1Status()
|
||||||
var b = getComm2Status()
|
var b = getComm2Status()
|
||||||
var str2: string = "$1 COM1: $2 COM2: $3" % [ptt_status, a, b]
|
var str2: string = "$1 COM1: $2 COM2: $3" % [ptt_status, a, b]
|
||||||
#echo(str1)
|
# echo(str1)
|
||||||
#echo(str2)
|
# echo(str2)
|
||||||
|
|
||||||
proc count() {.exportc: "count", dynlib.} =
|
proc count() {.exportc: "count", dynlib.} =
|
||||||
var temp: uint64
|
var temp: uint64
|
||||||
for i in 0..100_000:
|
for i in 0..100_000:
|
||||||
temp += 1
|
temp += 1
|
||||||
gCounter += 1
|
gCounter += 1
|
||||||
#echo("gCounter: ", gCounter)
|
# echo("gCounter: ", gCounter)
|
||||||
|
|
||||||
proc occupiedMem() {.exportc: "occupiedMem", dynlib.} =
|
proc occupiedMem() {.exportc: "occupiedMem", dynlib.} =
|
||||||
#echo("Occupied Memmory: ", getOccupiedMem())
|
echo("Occupied Memmory: ", getOccupiedMem())
|
||||||
discard
|
discard
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue