1.Use Environment.TickCount property.
[code]
function Delay(int ms)
{
int time = Environment.TickCount;
do while(true)
if(Environment.TickCount - time >= ms) return;
}
[/code]
2.it calculats the Time Laspe From the System Clock
[code]
public static DateTime PauseForMilliSeconds( int MilliSecondsToPauseFor )
{
System.DateTime ThisMoment = System.DateTime.Now ;
System.TimeSpan duration = new System.TimeSpan( 0, 0, 0, 0, MilliSecondsToPauseFor ) ;
System.DateTime AfterWards = ThisMoment.Add( duration ) ;
while ( AfterWards >= ThisMoment )
{
System.Windows.Forms.Application.DoEvents() ;
ThisMoment = System.DateTime.Now ;
}
return System.DateTime.Now ;
}
[/code]
2018年3月27日 星期二
2018年3月20日 星期二
Linux How do I install .run files?
Terminal Method
Assume the file is called
some-app.run and is in the folder /home/user/Downloads. You will need to modify these instructions to fit your situation.- Open a terminal (Applications->Accessories->Terminal).
- enter
cd /home/user/Downloads - enter
chmod +x some-app.run - enter
./some-app.run - if step 4 fails with a message including 'permission denied', try entering
sudo ./some-app.run(you will need to enter your password for this).
Q:slow boot time ubuntu - A start job is running for Raise network interfaces
ubuntu16.04.02_x64
editing the file:sudo vim /etc/systemd/system/network-online.targets.wants/networking.service
And changing the following line at the end of the file:
TimeoutStartSec=5min
to:
TimeoutStartSec=10sec
I have then rebooted the system and it works fine.
If you dont want to reboot the system again, just reboot the daemon by:
2018年3月18日 星期日
Gigabyte disable CSM option
“CSM Support
Enables or disables UEFI CSM (Compatibility Support Module) to support a legacy PC boot process. Always Enables UEFI CSM. (Default)
Never Disables UEFI CSM and supports UEFI BIOS boot process only.
This item is configurable only when Windows 8 Features is set to Windows 8.”
option nerver
Enables or disables UEFI CSM (Compatibility Support Module) to support a legacy PC boot process. Always Enables UEFI CSM. (Default)
Never Disables UEFI CSM and supports UEFI BIOS boot process only.
This item is configurable only when Windows 8 Features is set to Windows 8.”
option nerver
2018年1月11日 星期四
Ubuntu & Windows 雙系統修改開機啟動項順序
方式一:
修改vi /boot/grub/grub.cfg 開啟, set default="4"如下第2張圖。從上到下由0開始數,我的默認的grub啟動windows 7選項順序是第4個。
方式二:
修改 vi /boot/grub/grub.cfg ,尋找 windows 7 如下圖第二張,移動反白順序如下圖,即可排在第一順位,
如害怕改錯失效,記得先備份grub.cfg
### BEGIN /etc/grub.d/30_os-prober ###
windows 7 .............
### END /etc/grub.d/30_os-prober ###
2018年1月7日 星期日
2017年12月19日 星期二
訂閱:
文章 (Atom)



