diff options
author | ngld <ngld@tproxy.de> | 2013-09-25 16:41:40 +0200 |
---|---|---|
committer | ngld <ngld@tproxy.de> | 2013-09-25 16:41:40 +0200 |
commit | e9705b2fcb179fd16b60ab35c31bff87a5704743 (patch) | |
tree | 0b27f91984cf181035a29eae7256fdfd008ec1da /src/library.js | |
parent | 43ed0e83b8f387eb4ca2eb8e491a4c810d74e56b (diff) |
Add timeb.h to struct_info.json
Diffstat (limited to 'src/library.js')
-rw-r--r-- | src/library.js | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/library.js b/src/library.js index b45dd8f5..2e2298ec 100644 --- a/src/library.js +++ b/src/library.js @@ -6069,20 +6069,12 @@ LibraryManager.library = { // sys/timeb.h // ========================================================================== - // TODO: Where did this header go? - __timeb_struct_layout: Runtime.generateStructInfo([ - ['i32', 'time'], - ['i16', 'millitm'], - ['i16', 'timezone'], - ['i16', 'dstflag'] - ]), - ftime__deps: ['__timeb_struct_layout'], ftime: function(p) { var millis = Date.now(); - {{{ makeSetValue('p', '___timeb_struct_layout.time', 'Math.floor(millis/1000)', 'i32') }}}; - {{{ makeSetValue('p', '___timeb_struct_layout.millitm', 'millis % 1000', 'i16') }}}; - {{{ makeSetValue('p', '___timeb_struct_layout.timezone', '0', 'i16') }}}; // TODO - {{{ makeSetValue('p', '___timeb_struct_layout.dstflag', '0', 'i16') }}}; // TODO + {{{ makeSetValue('p', C_STRUCTS.timeb.time, 'Math.floor(millis/1000)', 'i32') }}}; + {{{ makeSetValue('p', C_STRUCTS.timeb.millitm, 'millis % 1000', 'i16') }}}; + {{{ makeSetValue('p', C_STRUCTS.timeb.timezone, '0', 'i16') }}}; // TODO + {{{ makeSetValue('p', C_STRUCTS.timeb.dstflag, '0', 'i16') }}}; // TODO return 0; }, |