use of io.questdb.std.NanosecondClock in project questdb by bluestreak01.
the class TelemetryJob method appendConfigRow.
private void appendConfigRow(SqlCompiler compiler, TableWriter configWriter, Long256 id, boolean enabled) {
TableWriter.Row row = configWriter.newRow();
if (null == id) {
final MicrosecondClock clock = compiler.getEngine().getConfiguration().getMicrosecondClock();
final NanosecondClock nanosecondClock = compiler.getEngine().getConfiguration().getNanosecondClock();
final long a = nanosecondClock.getTicks();
final long b = clock.getTicks();
row.putLong256(0, a, b, 0, 0);
LOG.info().$("new instance [id=").$256(a, b, 0, 0).$(", enabled=").$(enabled).$(']').$();
} else {
row.putLong256(0, id);
}
row.putBool(1, enabled);
row.putSym(2, configuration.getBuildInformation().getQuestDbVersion());
row.putSym(3, System.getProperty(OS_NAME));
String packageStr = System.getenv().get(QDB_PACKAGE);
if (null != packageStr) {
row.putSym(4, packageStr);
}
row.append();
configWriter.commit();
}
Aggregations