timestamp z dokładnością do milisekund tadam
nie dostaniesz nigdy takich samych wartości, ew możesz zrobic prosta funkcyjke, dodam kod w js ale jest na tyle prosty ze powinienes zrozumiec
/*!
* \brief Generate unique id.
*
* \return int
*/
function uniqid() {
var uid = Date.now();
// do nothing, only wait
// secure for use two times in a row
while ( uid === Date.now() ) {}
return uid;
}