Changeset 231b3fd in mainline for uspace/lib/c/generic/io/console.c


Ignore:
Timestamp:
2018-08-25T21:35:26Z (7 years ago)
Author:
GitHub <noreply@…>
Parents:
e2625b1a (diff), 3c45353 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jakub Jermář <jakub@…> (2018-08-25 21:35:26)
git-committer:
GitHub <noreply@…> (2018-08-25 21:35:26)
Message:

Merge 3c453534a2b093c8039d8e8059b923c71f3492a3 into e2625b1a1e5a2895b86f0e39c2d70a39e49e042a

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/io/console.c

    re2625b1a r231b3fd  
    223223
    224224bool console_get_event_timeout(console_ctrl_t *ctrl, cons_event_t *event,
    225     suseconds_t *timeout)
    226 {
    227         struct timeval t0;
    228         gettimeofday(&t0, NULL);
     225    usec_t *timeout)
     226{
     227        struct timespec t0;
     228        getuptime(&t0);
    229229
    230230        if (ctrl->input_aid == 0) {
     
    257257
    258258        /* Update timeout */
    259         struct timeval t1;
    260         gettimeofday(&t1, NULL);
    261         *timeout -= tv_sub_diff(&t1, &t0);
     259        struct timespec t1;
     260        getuptime(&t1);
     261        *timeout -= NSEC2USEC(ts_sub_diff(&t1, &t0));
    262262
    263263        return true;
Note: See TracChangeset for help on using the changeset viewer.