• Create Account

### #ActualDemion

Posted 16 March 2014 - 06:31 AM

You’re aren’t currently timing when the key was pressed, you are timing when the key was pressed, plus some logic plus a call to new.

Good point. Although WM_KEYDOWN / WM_KEYUP approach (commented out) has no allocations and same results. Anyway in real game I need to determine which event happend (press or release) and then determine key, so I need to do this allocations.

Especially for you reupload and fixed - pastebin

Last test up to 65 ms delays, Vsync is only 16 ms.

### #4Demion

Posted 16 March 2014 - 06:31 AM

You’re aren’t currently timing when the key was pressed, you are timing when the key was pressed, plus some logic plus a call to new.

Good point. Although WM_KEYDOWN / WM_KEYUP approach (commented out) has no allocations and same results. Anyway in real game I need to determine which event happend (press or release) and then determine key, so I need to do this allocations.

Especially for you reupload and fixed - pastebin

Last test up to 65 ms delays, Vsync is only 16 ms.

### #3Demion

Posted 16 March 2014 - 06:31 AM

You’re aren’t currently timing when the key was pressed, you are timing when the key was pressed, plus some logic plus a call to new.

Good point. Although WM_KEYDOWN / WM_KEYUP approach (commented out) has no allocations and same results. Anyway in real game I need to determine which event happend (press or release) and then determine key, so I need to do this allocations.

Especially for you reupload and fixed - pastebin

Last test up to 65 ms delays.

### #2Demion

Posted 16 March 2014 - 06:26 AM

You’re aren’t currently timing when the key was pressed, you are timing when the key was pressed, plus some logic plus a call to new.

Good point. Although WM_KEYDOWN / WM_KEYUP approach (commented out) has no allocations and same results. Anyway in real game I need to determine which event happend (press or release) and then determine key, so I need to do this allocations.

### #1Demion

Posted 16 March 2014 - 06:25 AM

You’re aren’t currently timing when the key was pressed, you are timing when the key was pressed, plus some logic plus a call to new.

Good point. Although WM_KEYDOWN / WM_KEYUP has no allocations and same results. Anyway in real game I need to determine which event happend (press or release) and then determine key, so I need to do this allocations.

PARTNERS