MCPcopy Create free account
hub / github.com/dwgx/WindsurfAPI / encodeTimestamp

Function encodeTimestamp

src/windsurf.js:82–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80// ─── Timestamp ─────────────────────────────────────────────
81
82function encodeTimestamp() {
83 const now = Date.now();
84 const secs = Math.floor(now / 1000);
85 const nanos = (now % 1000) * 1_000_000;
86 const parts = [writeVarintField(1, secs)];
87 if (nanos > 0) parts.push(writeVarintField(2, nanos));
88 return Buffer.concat(parts);
89}
90
91// ─── Metadata ──────────────────────────────────────────────
92

Callers 1

buildChatMessageFunction · 0.85

Calls 2

writeVarintFieldFunction · 0.90
pushMethod · 0.80

Tested by

no test coverage detected