By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,470 Members | 994 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,470 IT Pros & Developers. It's quick & easy.

what is java's System.currentTimeMillis() in python

P: n/a

/**
* Returns the current time in milliseconds. Note that
* while the unit of time of the return value is a millisecond,
* the granularity of the value depends on the underlying
* operating system and may be larger. For example, many
* operating systems measure time in units of tens of
* milliseconds.
*
* <pSee the description of the class <code>Date</codefor
* a discussion of slight discrepancies that may arise between
* "computer time" and coordinated universal time (UTC).
*
* @return the difference, measured in milliseconds, between
* the current time and midnight, January 1, 1970 UTC.
* @see java.util.Date
*/
public static native long currentTimeMillis();

python's time.clock() time.time() return a float,
i think it's not as handy as java's currentTimeMillis()
any good solution? thanks.

Sep 8 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a

neoedmund public static native long currentTimeMillis();

neoedmundpython's time.clock() time.time() return a float, i think
neoedmundit's not as handy as java's currentTimeMillis() any good
neoedmundsolution?

How about

int(time.clock() * 1000)

or

int(time.time() * 1000)

?

Skip
Sep 8 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.