Home:ALL Converter>Receive Unix Timestamp and convert time to milliseconds WP7

Receive Unix Timestamp and convert time to milliseconds WP7

Ask Time:2011-12-15T05:55:21         Author:jpmd

Json Formatter

I receive a unix timestamp in my wp7 app and i want to convert it to milliseconds..

I make this:

time.Ticks / 10000;

Is this correct? this give the total time in milliseconds or only the milliseconds?

I want the total time in milliseconds..

my method to get the time is this:

void _ntpClient_TimeReceived(object sender, NtpClient.TimeReceivedEventArgs e)
{
    this.Dispatcher.BeginInvoke(() =>
    {
        DateTime time = e.CurrentTime;

        long milliseconds = time.Ticks / 10000;
    });
}

Author:jpmd,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/8512231/receive-unix-timestamp-and-convert-time-to-milliseconds-wp7
yy