uibenchmark works
This commit is contained in:
parent
ebccc4e9a1
commit
8bdaab3f82
1 changed files with 3 additions and 1 deletions
|
|
@ -96,8 +96,10 @@ proc a(state: AppState) =
|
||||||
appState = state
|
appState = state
|
||||||
redrawForce()
|
redrawForce()
|
||||||
|
|
||||||
|
proc myToJson[T](x: T): cstring {.importcpp: "JSON.stringify(#, null, ' ')".}
|
||||||
|
|
||||||
proc b(samples: RootRef) =
|
proc b(samples: RootRef) =
|
||||||
document.body.innerHTML = cstring"<pre>" & toJson(samples) & cstring"</pre>"
|
document.body.innerHTML = cstring"<pre>" & myToJson(samples) & cstring"</pre>"
|
||||||
|
|
||||||
proc init*(a: cstring, b: cstring) {.importc: "uibench.init", nodecl.}
|
proc init*(a: cstring, b: cstring) {.importc: "uibench.init", nodecl.}
|
||||||
proc run*(a: proc(state: AppState), b: proc(samples: RootRef)) {.importc: "uibench.run", nodecl.}
|
proc run*(a: proc(state: AppState), b: proc(samples: RootRef)) {.importc: "uibench.run", nodecl.}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue