mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
add proper cdm strings and comment out all echos
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
discard """
|
||||
cmd: " nim c main.nim"
|
||||
final output: "Done!"
|
||||
cmd: "nim $target --debuginfo $options $file"
|
||||
output: "Done"
|
||||
"""
|
||||
|
||||
import times
|
||||
@@ -26,15 +26,15 @@ proc main() =
|
||||
while accumTime < runTime:
|
||||
for i in 0..10:
|
||||
count()
|
||||
echo("1. sleeping... ")
|
||||
#echo("1. sleeping... ")
|
||||
sleep(500)
|
||||
for i in 0..10:
|
||||
status()
|
||||
echo("2. sleeping... ")
|
||||
#echo("2. sleeping... ")
|
||||
sleep(500)
|
||||
occupiedMem()
|
||||
accumTime = cast[Time]((getTime() - startTime))
|
||||
echo("--- Minutes left to run: ", int(int(runTime-accumTime)/60))
|
||||
#echo("--- Minutes left to run: ", int(int(runTime-accumTime)/60))
|
||||
echo("Done")
|
||||
|
||||
main()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
discard """
|
||||
cmd: " nim c shared.nim"
|
||||
cmd: "nim $target --debuginfo --hints:on --app:lib $options $file"
|
||||
"""
|
||||
|
||||
import strutils
|
||||
@@ -45,16 +45,16 @@ proc status() {.exportc: "status", dynlib.} =
|
||||
var a = getComm1Status()
|
||||
var b = getComm2Status()
|
||||
var str2: string = "$1 COM1: $2 COM2: $3" % [ptt_status, a, b]
|
||||
echo(str1)
|
||||
echo(str2)
|
||||
#echo(str1)
|
||||
#echo(str2)
|
||||
|
||||
proc count() {.exportc: "count", dynlib.} =
|
||||
var temp: uint64
|
||||
for i in 0..100_000:
|
||||
temp += 1
|
||||
gCounter += 1
|
||||
echo("gCounter: ", gCounter)
|
||||
#echo("gCounter: ", gCounter)
|
||||
|
||||
proc occupiedMem() {.exportc: "occupiedMem", dynlib.} =
|
||||
echo("Occupied Memmory: ", getOccupiedMem())
|
||||
#echo("Occupied Memmory: ", getOccupiedMem())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user