/****************************************************************************/
/* Copyright 2016 MBARI.                                                    */
/* MBARI Proprietary Information. All rights reserved.                      */
/****************************************************************************/
#include <chrono>
#include <string>

#include <unistd.h>
#include <sys/utsname.h>

double getTimeStamp()
{
    auto ts = std::chrono::system_clock::now();
    std::chrono::duration<double> epoch_time = ts.time_since_epoch();

    return epoch_time.count();
}

std::string getPublisherName()
{
    struct utsname uname_data;

    // get the node name
    uname(&uname_data);

    // return the pub name string
    return std::string(uname_data.nodename);
}

int getPublisherPid()
{
    return getpid();
}
