src/java.base/unix/native/libnet/net_util_md.c
changeset 49440 396ea30afbd5
parent 47216 71c04702a3d5
child 49704 bc1c7e41e285
equal deleted inserted replaced
49439:bf53d82a51e5 49440:396ea30afbd5
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
  1539  * of the specified operations or the timeout expired.
  1539  * of the specified operations or the timeout expired.
  1540  *
  1540  *
  1541  * It returns the time left from the timeout (possibly 0), or -1 if it expired.
  1541  * It returns the time left from the timeout (possibly 0), or -1 if it expired.
  1542  */
  1542  */
  1543 
  1543 
  1544 jint
  1544 JNIEXPORT jint JNICALL
  1545 NET_Wait(JNIEnv *env, jint fd, jint flags, jint timeout)
  1545 NET_Wait(JNIEnv *env, jint fd, jint flags, jint timeout)
  1546 {
  1546 {
  1547     jlong prevNanoTime = JVM_NanoTime(env, 0);
  1547     jlong prevNanoTime = JVM_NanoTime(env, 0);
  1548     jlong nanoTimeout = (jlong) timeout * NET_NSEC_PER_MSEC;
  1548     jlong nanoTimeout = (jlong) timeout * NET_NSEC_PER_MSEC;
  1549     jint read_rv;
  1549     jint read_rv;