how to get the current time in milliseconds .net

Code Example - how to get the current time in milliseconds .net

                
                        DateTime.Now.Millisecond;
                    
                
 

csharp get current milliseconds

                        
                                //Get now in milliseconds
long milliseconds = DateTimeOffset.Now.ToUnixTimeMilliseconds();
                            
                        
 

Related code examples