A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/cztomczak/cefpython/commit/6ffb865c0a95346e9343832ec4405f3591ce7ab8 below:

Add a test that measures time of executing Python function and then js · cztomczak/cefpython@6ffb865 · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+5

-0

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+5

-0

lines changed Original file line number Diff line number Diff line change

@@ -52,9 +52,14 @@

52 52

print("test_function() ok");

53 53 54 54

// Test binding external object and use of javascript<>python callbacks

55 +

var start_time = new Date().getTime();

56 +

print("[TIMER] Call Python function and then js callback that was"+

57 +

" passed (Issue #277 test)");

55 58

external.test_callbacks(function(msg_from_python, py_callback){

56 59

if (msg_from_python == "String sent from Python") {

57 60

print("test_callbacks() ok");

61 +

var execution_time = new Date().getTime() - start_time;

62 +

print("[TIMER]: Elapsed = "+String(execution_time)+" ms");

58 63

} else {

59 64

throw new Error("test_callbacks(): msg_from_python contains"+

60 65

" invalid value");

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4