<p><a href="https://gerrit.osmocom.org/c/libosmocore/+/24924">View Change</a></p><p>2 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/24924/4/src/vty/command.c">File src/vty/command.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/24924/4/src/vty/command.c@3050">Patch Set #4, Line 3050:</a> <code style="font-family:monospace,monospace">     time_t uptime = now.tv_sec - starttime.tv_sec;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">IIRC time_t has a lower range (32bits signed?) than timespec (64bits), so there might be integer underflows here.</p><p style="white-space: pre-wrap; word-wrap: break-word;">The most correct approach would likely be to use timespecsub() after #include <osmocom/core/timer_compat.h> - but I don't think it's super critical.  I'm just surprised we're not using the kind of code we already have to deal with timespec values.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/24924/4/src/vty/command.c@3056">Patch Set #4, Line 3056:</a> <code style="font-family:monospace,monospace">    vty_out(vty, "%s has been running for %dd %dh %dm %ds%s", host.app_info->name, d, h, m, s, VTY_NEWLINE);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">maybe we could add a time and date since when it is running. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">see my previous comments. The process start-up could happen before a proper RTC time/date is set, so we cannot simply store the start-up time/date.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/24924">change 24924</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/libosmocore/+/24924"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ic7d9d5d3c8a9abd06a7e626aed7679f68406040c </div>
<div style="display:none"> Gerrit-Change-Number: 24924 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Fri, 16 Jul 2021 15:56:49 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>