gpt4 book ai didi

.net - 减慢控制台速度

转载 作者:行者123 更新时间:2023-12-05 01:21:50 25 4
gpt4 key购买 nike

我有这个程序,打印的是正弦波,但是速度太快了,如何降低控制台的行打印速度?

    Sub Main()
Dim x As Double = 0
Do
Console.Write(times(" ", Math.Sin(x) * 10 + 30))
Console.WriteLine("@")
x += 0.1
Loop
End Sub

Private Function times(ByVal ch As Char, ByVal t As Integer) As String
Dim result As String = ""
For i = 0 To t
result += ch
Next

Return result
End Function

最佳答案

你可以写Thread.Sleep(TimeSpan.FromHours(1))
(尽管您可能需要 FromSeconds)

关于.net - 减慢控制台速度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6976225/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com