PMCONVERTTIME(3)

πŸ“¦
version 6.3.8 Β· 4 versions
, in centos-stream 9, debian trixie, ubuntu questing

PMCONVERTTIME(3) πŸ’–

okay bestie, welcome to the Library Functions Manual corner of the PCP docs ✨ this one's for the devs poking around in the internals, so grab a snack πŸ“


✨ NAME ✨

__pmConvertTime, __pmConvertHighResTime β€” convert tm structure into seconds πŸ•


🌸 C SYNOPSIS 🌸

#include "pmapi.h"
#include "libpcp.h"

int __pmConvertTime(struct tm *tmin, struct timeval *origin,
        struct timeval *rslt);
int __pmConvertHighResTime(struct tm *tmin, struct timespec *origin,
        struct timespec *rslt);

cc ... -lpcp

πŸ’€ CAVEAT πŸ’€

This documentation is intended for internal Performance Co-Pilot (PCP) developer use.

These interfaces are not part of the PCP APIs that are guaranteed to remain fixed across releases, and ngl they may not work, or may provide different semantics at some point in the future. πŸ’…

no cap, if you're building on these, know that they could just... change on you. it's giving "internal only" energy for a reason.

πŸ¦‹ DESCRIPTION πŸ¦‹

__pmConvertTime and __pmConvertHighResTime accept a tm structure that has been filled in by __pmParseCtime(3), plus a reference time point called origin, and they fill in the given rslt structure with the time the user actually meant when they specified a partial ctime or a positive or negative time interval. ✨

Typically, the argument origin is the start time for a set of PCP archives β€” unless the user specified a negative interval offset, in which case it's the end time of the archive. πŸŽ€

__pmConvertTime and __pmConvertHighResTime return 0 if successful. They return -1 and write an error message to stderr, if an error is detected. 😭

Use pmNewZone(3), pmNewContextZone(3) or pmUseZone(3) to establish a new current timezone that will effect __pmConvertTime. 🌈


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole vibe bestie, you ate 🫢 this was Performance Co-Pilot (PCP) doing its internal-docs thing, mwah πŸ’‹ go forth and convert those tm structures fr fr 🌟

πŸ“¦ where this page comes from