我有一个需要每30分钟执行一次的功能。如何使用Today.Minute过滤它? 这是我制作的代码。
mFlowLayout.setAdapter(new TagAdapter<String>(mVals)
{
@Override
public View getView(FlowLayout parent, int position, String s)
{
TextView tv = (TextView) mInflater.inflate(R.layout.tv,
mFlowLayout, false);
tv.setText(s);
return tv;
}
});
请任何人。帮助:3
答案 0 :(得分:0)
我想这样的事情可以解决问题:
Module StartupModule
Private _timer As Timers.Timer
Sub Main()
SetTimer(3000)
Console.ReadLine()
KillTimer()
End Sub
Private Sub SetTimer(interval As Double)
_timer = New Timers.Timer(interval)
AddHandler _timer.Elapsed, AddressOf OnTimedEvent
_timer.Start()
End Sub
Private Sub KillTimer()
_timer.Stop()
_timer.Dispose()
End Sub
Private Sub OnTimedEvent(source As Object, e As ElapsedEventArgs)
Console.WriteLine(DateTime.Now)
End Sub
End Module