Saturday, July 6, 2024
HomeiOS Developmentandroid - how does the DateTime.now().microsecondsSinceEpoch precisely work in dart

android – how does the DateTime.now().microsecondsSinceEpoch precisely work in dart


for (int i = 0; i < 3; i++) {
   ultimate key = DateTime.now().microsecondsSinceEpoch;
   newTickets["$phoneNumber#$key#$username#${i + 1}"] = consequence.isNotEmpty ?
                                              "${selectedType}_${consequence[i]}"
                                              : selectedType;
                                        }

I take advantage of the precise above code in two purposes, nonetheless within the first app the important thing worth is being completely different for every iteration in contrast to the second the place all the three values of the important thing are precisely the identical , I attempted to write down a loop which iterate 100 occasions and does nothing however printing the DateTime.now().microsecondsSinceEpoch the worth modifications however not in every iteration for every a number of iterations the DateTime.now().microsecondsSinceEpoch worth change as soon as , any concepts about why that is taking place ?



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments