#include <inttypes.h>
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <stdint.h>

uint64_t get_nanos(void) {
    struct timespec ts;
    clock_gettime(CLOCK_REALTIME, &ts);
    return (uint64_t)ts.tv_sec * 1000000000ULL + ts.tv_nsec;
}

int popcount(uint64_t n) {
    int count = 0;
    while (n > 0) {
        n &= (n - 1);
        count++;
    }
    return count;
}

int main(void) {
    int result = popcount(get_nanos());
    printf("Result: %i\n", result);
    return EXIT_SUCCESS;
}
