VB.NET获取系统当前精确时间(毫秒级)

来源:互联网 发布:结婚照p图软件 编辑:程序博客网 时间:2024/05/13 01:12

声明:转自 烽火连三月的百度空间

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Cli

ck

        TextBox1.Text = TextBox1.Text & DateTime.Now & " " & DateTime.Now.Millisecond & Chr(13) & Chr(10)

    End Sub

End Class

其中DateTime.Now.Millisecond 即为毫秒级的时间

Chr(13) 、 Chr(10)分别表示换行符和回车键 最简单的方法就是:

dim t as string

t=DateTime.Now.Millisecond

0 0