Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some changes related to UNITS #5

Open
kikoalbiol opened this issue Jun 22, 2018 · 1 comment
Open

Some changes related to UNITS #5

kikoalbiol opened this issue Jun 22, 2018 · 1 comment

Comments

@kikoalbiol
Copy link

Make explicit the time units.

struct field_caller : public ts_caller {
            detail::field_caller& field(const std::string& k, const std::string& v)   { return _f_s(',', k, v); }
            detail::field_caller& field(const std::string& k, bool v)                 { return _f_b(',', k, v); }
            detail::field_caller& field(const std::string& k, short v)                { return _f_i(',', k, v); }
            detail::field_caller& field(const std::string& k, int v)                  { return _f_i(',', k, v); }
            detail::field_caller& field(const std::string& k, long v)                 { return _f_i(',', k, v); }
            detail::field_caller& field(const std::string& k, long long v)            { return _f_i(',', k, v); }
            detail::field_caller& field(const std::string& k, double v, int prec = 2) { return _f_f(',', k, v, prec); }
            detail::ts_caller& timestamp_ns(unsigned long long ts)                  { return _ts(ts); }
            detail::ts_caller& timestamp_us(unsigned long long ts)                  { return timestamp_ns(1000*ts); }
            detail::ts_caller& timestamp_ms(unsigned long long ts)                  { return timestamp_us(1000*ts); }
            detail::ts_caller& timestamp_s(unsigned long long ts)                  { return timestamp_ms(1000*ts); }
        };
@orca-zhang
Copy link
Owner

Thank you for your contributions.
I'll check it and merge them then.
: )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants