MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / walk

Method walk

src/builtin/module_builtin_fio.cpp:50–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48 struct TimeAnnotation : ManagedValueAnnotation<Time> {
49 TimeAnnotation(ModuleLibrary & mlib) : ManagedValueAnnotation<Time>(mlib, "clock","das::Time") {}
50 virtual void walk ( DataWalker & walker, void * data ) override {
51 if ( walker.reading ) {
52 // there shuld be a way to read time from the stream here
53 } else {
54 Time * t = (Time *) data;
55 char mbstr[100];
56 if ( strftime(mbstr, sizeof(mbstr), "%c", localtime(&t->time)) ) {
57 char * str = mbstr;
58 walker.String(str);
59 }
60 }
61 }
62 };
63
64 Time builtin_clock() {

Callers 6

builtin_write_stringFunction · 0.45
builtin_strdupFunction · 0.45
jit_string_builderFunction · 0.45
jit_string_builder_tempFunction · 0.45
dapiWalkDataFunction · 0.45
dapiWalkDataVFunction · 0.45

Calls 2

localtimeFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected