I have been doing an operation in C++ on the timer struct of Linux provided by the interface "clock_gettime(CLOCK_MONOTONIC, &CurrentTime)"
#include <iostream>
#include <time.h>
int main()
{
struct timespec CurrentTime;
CurrentTime.tv_sec = 28220;
CurrentTime.tv_nsec = 461189000;
unsigned long long TimeNow;
TimeNow = (28220 * 1000000) + (461189000 * 0.001);
std::cout << TimeNow;
}
yet the result always giving TimeNow as a Zero.
I would appreciate if any has answer to this question or a lead to follow. It was done using GCC Compiler
Code Snipped could be found here http://rextester.com/XRR83683