diff --git a/src/session.c b/src/session.c
index b62adb5..fdbda20 100644
--- a/src/session.c
+++ b/src/session.c
@@ -51,29 +51,18 @@
  *        -1 - error
  */
 int
-nc_timedlock(pthread_mutex_t *lock, int timeout, int *elapsed)
+nc_timedlock(pthread_mutex_t *lock, int timeout)
 {
     int ret;
-    struct timespec ts_timeout, ts_old, ts_new;
+    struct timespec ts_timeout;
 
     if (timeout > 0) {
         clock_gettime(CLOCK_REALTIME, &ts_timeout);
 
-        if (elapsed) {
-            ts_old = ts_timeout;
-        }
-
         ts_timeout.tv_sec += timeout / 1000;
         ts_timeout.tv_nsec += (timeout % 1000) * 1000000;
 
         ret = pthread_mutex_timedlock(lock, &ts_timeout);
-
-        if (elapsed) {
-            clock_gettime(CLOCK_REALTIME, &ts_new);
-
-            *elapsed += (ts_new.tv_sec - ts_old.tv_sec) * 1000;
-            *elapsed += (ts_new.tv_nsec - ts_old.tv_nsec) / 1000000;
-        }
     } else if (!timeout) {
         ret = pthread_mutex_trylock(lock);
     } else { /* timeout == -1 */
@@ -274,7 +263,7 @@
 
     /* mark session for closing */
     if (session->ti_lock) {
-        r = nc_timedlock(session->ti_lock, -1, NULL);
+        r = nc_timedlock(session->ti_lock, -1);
         if (r == -1) {
             return;
         }
diff --git a/src/session_client.c b/src/session_client.c
index 7eb7e37..b812f4a 100644
--- a/src/session_client.c
+++ b/src/session_client.c
@@ -437,7 +437,7 @@
 static NC_MSG_TYPE
 get_msg(struct nc_session *session, int timeout, uint64_t msgid, struct lyxml_elem **msg)
 {
-    int r, elapsed = 0;
+    int r;
     char *ptr;
     const char *str_msgid;
     uint64_t cur_msgid;
@@ -445,7 +445,7 @@
     struct nc_msg_cont *cont, **cont_ptr;
     NC_MSG_TYPE msgtype = 0; /* NC_MSG_ERROR */
 
-    r = nc_timedlock(session->ti_lock, timeout, &elapsed);
+    r = nc_timedlock(session->ti_lock, timeout);
     if (r == -1) {
         /* error */
         return NC_MSG_ERROR;
@@ -453,9 +453,6 @@
         /* timeout */
         return NC_MSG_WOULDBLOCK;
     }
-    if (timeout > 0) {
-        timeout -= elapsed;
-    }
 
     /* try to get notification from the session's queue */
     if (!msgid && session->notifs) {
@@ -1668,7 +1665,7 @@
         return NC_MSG_ERROR;
     }
 
-    ret = nc_timedlock(session->ti_lock, timeout, NULL);
+    ret = nc_timedlock(session->ti_lock, timeout);
     if (ret == -1) {
         /* error */
         r = NC_MSG_ERROR;
diff --git a/src/session_p.h b/src/session_p.h
index 77fe8f1..25757a7 100644
--- a/src/session_p.h
+++ b/src/session_p.h
@@ -287,7 +287,7 @@
 
 NC_MSG_TYPE nc_send_msg(struct nc_session *session, struct lyd_node *op);
 
-int nc_timedlock(pthread_mutex_t *lock, int timeout, int *elapsed);
+int nc_timedlock(pthread_mutex_t *lock, int timeout);
 
 /**
  * @brief Fill libyang context in \p session. Context models are based on the stored session
@@ -472,7 +472,7 @@
  * returned POLLIN.
  *
  * @param[in] session NETCONF session communicating on the socket.
- * @param[in,out] timeout Timeout for locking ti_lock, gets updated.
+ * @param[in,out] timeout Timeout for locking ti_lock.
  * @return 0 - timeout,
  *         1 if \p session channel has data,
  *         2 if some other channel has data,
@@ -481,7 +481,7 @@
  *         5 on new NETCONF SSH channel,
  *        -1 on error.
  */
-int nc_ssh_pollin(struct nc_session *session, int *timeout);
+int nc_ssh_pollin(struct nc_session *session, int timeout);
 
 void nc_server_ssh_clear_opts(struct nc_server_ssh_opts *opts);
 
diff --git a/src/session_server.c b/src/session_server.c
index 1909c85..63ed831 100644
--- a/src/session_server.c
+++ b/src/session_server.c
@@ -788,7 +788,7 @@
                 uint16_t j;
 
                 /* things are not that simple with SSH... */
-                ret = nc_ssh_pollin(ps->sessions[i], &timeout);
+                ret = nc_ssh_pollin(ps->sessions[i], timeout);
 
                 /* clear POLLIN on sessions sharing this session's SSH session */
                 if ((ret == 1) || (ret >= 4)) {
@@ -844,7 +844,7 @@
     session = ps->sessions[i];
 
     /* reading an RPC and sending a reply must be atomic (no other RPC should be read) */
-    ret = nc_timedlock(session->ti_lock, timeout, NULL);
+    ret = nc_timedlock(session->ti_lock, timeout);
     if (ret != 1) {
         /* error or timeout */
         goto finish;
diff --git a/src/session_server_ssh.c b/src/session_server_ssh.c
index 74401b8..1fa3165 100644
--- a/src/session_server_ssh.c
+++ b/src/session_server_ssh.c
@@ -917,7 +917,7 @@
 static int
 nc_open_netconf_channel(struct nc_session *session, int timeout)
 {
-    int elapsed_usec = 0, ret, elapsed;
+    int elapsed_usec = 0, ret;
 
     /* message callback is executed twice to give chance for the channel to be
      * created if timeout == 0 (it takes 2 messages, channel-open, subsystem-request) */
@@ -927,7 +927,7 @@
             return -1;
         }
 
-        ret = nc_timedlock(session->ti_lock, timeout, NULL);
+        ret = nc_timedlock(session->ti_lock, timeout);
         if (ret != 1) {
             return ret;
         }
@@ -969,12 +969,10 @@
             return -1;
         }
 
-        elapsed = 0;
-        ret = nc_timedlock(session->ti_lock, timeout, &elapsed);
+        ret = nc_timedlock(session->ti_lock, timeout);
         if (ret != 1) {
             return ret;
         }
-        elapsed_usec += elapsed * 1000;
 
         ret = ssh_execute_message_callbacks(session->ti.libssh.session);
         if (ret != SSH_OK) {
@@ -1006,15 +1004,12 @@
 /* ret 0 - timeout, 1 channel has data, 2 some other channel has data,
  * 3 status change, 4 new SSH message, 5 new NETCONF SSH channel, -1 error */
 int
-nc_ssh_pollin(struct nc_session *session, int *timeout)
+nc_ssh_pollin(struct nc_session *session, int timeout)
 {
-    int ret, elapsed = 0;
+    int ret;
     struct nc_session *new;
 
-    ret = nc_timedlock(session->ti_lock, *timeout, &elapsed);
-    if (*timeout > 0) {
-        *timeout -= elapsed;
-    }
+    ret = nc_timedlock(session->ti_lock, timeout);
 
     if (ret != 1) {
         return ret;
