Skip to content

Commit

Permalink
Use native version of ftime function. NFC (#16606)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbc100 authored Mar 28, 2022
1 parent b8e1d71 commit b4f8e95
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
13 changes: 0 additions & 13 deletions src/library.js
Original file line number Diff line number Diff line change
Expand Up @@ -1191,19 +1191,6 @@ LibraryManager.library = {
return _strptime(buf, format, tm); // no locale support yet
},

// ==========================================================================
// sys/timeb.h
// ==========================================================================

ftime: function(p) {
var millis = Date.now();
{{{ makeSetValue('p', C_STRUCTS.timeb.time, '(millis/1000)|0', 'i32') }}};
{{{ makeSetValue('p', C_STRUCTS.timeb.millitm, 'millis % 1000', 'i16') }}};
{{{ makeSetValue('p', C_STRUCTS.timeb.timezone, '0', 'i16') }}}; // Obsolete field
{{{ makeSetValue('p', C_STRUCTS.timeb.dstflag, '0', 'i16') }}}; // Obsolete field
return 0;
},

// ==========================================================================
// setjmp.h
// ==========================================================================
Expand Down
1 change: 1 addition & 0 deletions tools/system_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,7 @@ def get_files(self):
'asctime.c',
'ctime.c',
'difftime.c',
'ftime.c',
'gmtime.c',
'localtime.c',
'nanosleep.c',
Expand Down

0 comments on commit b4f8e95

Please sign in to comment.