($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: Andrew Zaborowski <andrew.zaborowski@intel.com>
To: ell@lists.linux.dev
Subject: [PATCH 1/6] time: Add time_realtime_now
Date: Wed, 26 Oct 2022 15:15:53 +0200	[thread overview]
Message-ID: <20221026131558.2393488-1-andrew.zaborowski@intel.com> (raw)

---
 ell/time-private.h | 1 +
 ell/time.c         | 8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/ell/time-private.h b/ell/time-private.h
index 83c23dd..e107503 100644
--- a/ell/time-private.h
+++ b/ell/time-private.h
@@ -24,3 +24,4 @@ uint64_t _time_pick_interval_secs(uint32_t min_secs, uint32_t max_secs);
 uint64_t _time_fuzz_msecs(uint64_t ms);
 uint64_t _time_fuzz_secs(uint32_t secs, uint32_t max_offset);
 uint64_t _time_realtime_to_boottime(const struct timeval *ts);
+uint64_t time_realtime_now(void);
diff --git a/ell/time.c b/ell/time.c
index 41e5725..2eac6c4 100644
--- a/ell/time.c
+++ b/ell/time.c
@@ -58,6 +58,14 @@ LIB_EXPORT uint64_t l_time_now(void)
 	return _time_from_timespec(&now);
 }
 
+uint64_t time_realtime_now(void)
+{
+	struct timespec now;
+
+	clock_gettime(CLOCK_REALTIME, &now);
+	return _time_from_timespec(&now);
+}
+
 /**
  * l_time_after
  *
-- 
2.34.1


             reply	other threads:[~2022-10-26 13:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-26 13:15 Andrew Zaborowski [this message]
2022-10-26 13:15 ` [PATCH 2/6] cert: Add l_cert_get_valid_times Andrew Zaborowski
2022-10-26 13:15 ` [PATCH 3/6] tls: Fix an RFC reference Andrew Zaborowski
2022-10-26 13:15 ` [PATCH 4/6] tls: Add support for caching client session states Andrew Zaborowski
2022-10-26 13:15 ` [PATCH 5/6] tls: Client session resumption Andrew Zaborowski
2022-10-26 13:15 ` [PATCH 6/6] examples: Cache sessions in https-client-test Andrew Zaborowski
2022-10-28 18:27 ` [PATCH 1/6] time: Add time_realtime_now Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221026131558.2393488-1-andrew.zaborowski@intel.com \
    --to=andrew.zaborowski@intel.com \
    --cc=ell@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).