| 49 | } |
| 50 | |
| 51 | void xs_time_delta(xsMachine *the) |
| 52 | { |
| 53 | xsNumberValue start, end; |
| 54 | |
| 55 | start = xsToNumber(xsArg(0)); |
| 56 | if (xsToNumber(xsArgc) > 1) |
| 57 | end = xsToNumber(xsArg(1)); |
| 58 | else { |
| 59 | c_timeval tv; |
| 60 | c_gettimeofday(&tv, NULL); |
| 61 | end = ((double)(tv.tv_sec) * 1000.0) + ((double)(tv.tv_usec / 1000)); |
| 62 | } |
| 63 | xsResult = xsNumber(end - start); |
| 64 | } |
nothing calls this directly
no test coverage detected