mycodesucks to Programmer Humor@lemmy.ml • 2 years agoIt's not greatmedia.kbin.socialimagemessage-square66fedilinkarrow-up11.49Kfile-text
arrow-up11.49KimageIt's not greatmedia.kbin.socialmycodesucks to Programmer Humor@lemmy.ml • 2 years agomessage-square66fedilinkfile-text
minus-square@rmuk@feddit.uklinkfedilinkEnglish11•2 years agoSteadily increasing unsigned integer on a long-running piece of infrastructure: bonjour
minus-square@socsa@lemmy.mllinkfedilink3•edit-22 years agoLaughs in struct LooooongCounter { long highPart; long lowPart; };
minus-square@TheyCallMeHacked@discuss.tchncs.delinkfedilink3•2 years agoLooooongCounter operator++(const LooooongCounter& c) { if(c.lowPart == ULONG_MAX) { c.highPart++; c.lowPart = 0; } else c.lowPart++; }
Steadily increasing unsigned integer on a long-running piece of infrastructure: bonjour
Laughs in
struct LooooongCounter { long highPart; long lowPart; };
LooooongCounter operator++(const LooooongCounter& c) { if(c.lowPart == ULONG_MAX) { c.highPart++; c.lowPart = 0; } else c.lowPart++; }