mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-29 18:48:09 +08:00
show memset/memcpy speed
This commit is contained in:
parent
0239111e33
commit
05f62d2109
@ -33,6 +33,11 @@
|
||||
#include "ui_loader/ui_builder_default.h"
|
||||
#include "common.inc"
|
||||
|
||||
#ifdef TK_MEM_SPEED_TEST
|
||||
uint32_t g_memcpy_speed;
|
||||
uint32_t g_memset_speed;
|
||||
#endif/*TK_MEM_SPEED_TEST*/
|
||||
|
||||
static ret_t on_show_dialog(void* ctx, event_t* e) {
|
||||
uint32_t code = 0;
|
||||
const char* name = (const char*)ctx;
|
||||
@ -77,16 +82,28 @@ static ret_t on_show_window2(void* ctx, event_t* e) {
|
||||
}
|
||||
|
||||
ret_t application_init() {
|
||||
char text[32];
|
||||
widget_t* win = window_open("window");
|
||||
widget_t* bar1 = widget_lookup(win, "bar1", TRUE);
|
||||
widget_t* bar2 = widget_lookup(win, "bar2", TRUE);
|
||||
#ifdef TK_MEM_SPEED_TEST
|
||||
widget_t* left = widget_lookup(win, "left", TRUE);
|
||||
widget_t* right = widget_lookup(win, "right", TRUE);
|
||||
|
||||
tk_snprintf(text, sizeof(text), "set:%uK", g_memset_speed);
|
||||
widget_set_text_utf8(left, text);
|
||||
|
||||
tk_snprintf(text, sizeof(text), "cpy:%uK", g_memcpy_speed);
|
||||
widget_set_text_utf8(right, text);
|
||||
#endif/*TK_MEM_SPEED_TEST*/
|
||||
|
||||
widget_child_on(win, "inc", EVT_CLICK, on_inc, bar2);
|
||||
widget_child_on(win, "dec", EVT_CLICK, on_dec, bar2);
|
||||
widget_child_on(win, "dialog1", EVT_CLICK, on_show_dialog, "dialog1");
|
||||
widget_child_on(win, "dialog2", EVT_CLICK, on_show_dialog, "dialog2");
|
||||
widget_child_on(win, "window1", EVT_CLICK, on_show_window1, "window1");
|
||||
widget_child_on(win, "window2", EVT_CLICK, on_show_window2, "window2");
|
||||
// timer_add(on_timer, bar1, 500);
|
||||
timer_add(on_timer, bar1, 500);
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
@ -116,4 +116,4 @@ const unsigned char image_earth[] = {
|
||||
0x00,0x00,0x00,0xb4,0x00,0x00,0x00,0xdf,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xdf,
|
||||
0x00,0x00,0x00,0xb4,0x00,0x00,0x00,0x73,0x00,0x00,0x00,0x0d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x30,0x21,0x50,0x68,};/*2348*/
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*2348*/
|
||||
|
@ -181,4 +181,4 @@ const unsigned char image_green_btn_o[] = {
|
||||
0x26,0x83,0x5a,0xff,0x26,0x83,0x5a,0xff,0x26,0x83,0x5a,0xff,0x26,0x83,0x5a,0xff,0x26,0x83,0x5a,0xff,
|
||||
0x26,0x83,0x5a,0xff,0x3a,0x8d,0x68,0xff,0x62,0xa2,0x85,0xd7,0x85,0xb7,0xa0,0x97,0xd4,0xe5,0xdd,0x37,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x78,0x0c,0xeb,0x7a,};/*3644*/
|
||||
0x00,0x00,0x00,0x00,};/*3644*/
|
||||
|
@ -116,4 +116,4 @@ const unsigned char image_question[] = {
|
||||
0x12,0x96,0xdb,0xb4,0x12,0x96,0xdb,0xe2,0x12,0x96,0xdb,0xfb,0x12,0x96,0xdb,0xff,0x12,0x96,0xdb,0xe7,
|
||||
0x12,0x96,0xdb,0xb9,0x11,0x96,0xdb,0x73,0x0e,0x91,0xda,0x0d,0x00,0x00,0x00,0x00,0x10,0x8f,0xdf,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*2348*/
|
||||
0x00,0x00,0x00,0x00,0x88,0x2a,0xe9,0x7a,};/*2348*/
|
||||
|
@ -116,4 +116,4 @@ const unsigned char image_right_on[] = {
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x88,0x2a,0xe9,0x7a,};/*2348*/
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*2348*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
const unsigned char ui_window[] = {
|
||||
0x04,0x00,0x01,0x01,0x7e,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x77,0x69,0x6e,0x64,0x6f,0x77,0x00,0x64,
|
||||
0x04,0x00,0x01,0x01,0x8d,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x77,0x69,0x6e,0x64,0x6f,0x77,0x00,0x64,
|
||||
0x61,0x74,0x61,0x00,0x00,0x00,0x00,0x00,0x12,0x12,0x22,0x11,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x01,0x00,0x00,0xe0,0x01,0x00,0x00,0x6e,0x61,0x6d,0x65,
|
||||
0x00,0x6d,0x61,0x69,0x6e,0x00,0x00,0x01,0x00,0x0a,0x00,0x00,0x00,0x01,0x00,0x0a,0x00,0x00,0x00,0x05,
|
||||
@ -8,41 +8,42 @@ const unsigned char ui_window[] = {
|
||||
0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,
|
||||
0x64,0x65,0x63,0x00,0x74,0x65,0x78,0x74,0x00,0x44,0x65,0x63,0x00,0x00,0x00,0x01,0x00,0x09,0x00,0x00,
|
||||
0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x6e,
|
||||
0x61,0x6d,0x65,0x00,0x00,0x74,0x65,0x78,0x74,0x00,0x4c,0x65,0x66,0x74,0x00,0x00,0x00,0x01,0x00,0x09,
|
||||
0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x1e,0x00,0x00,
|
||||
0x00,0x6e,0x61,0x6d,0x65,0x00,0x00,0x74,0x65,0x78,0x74,0x00,0x43,0x65,0x6e,0x74,0x65,0x72,0x00,0x00,
|
||||
0x00,0x01,0x00,0x09,0x00,0x00,0x00,0x00,0x00,0xc8,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x50,0x00,0x00,
|
||||
0x00,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x00,0x74,0x65,0x78,0x74,0x00,0x52,0x69,0x67,0x68,
|
||||
0x74,0x00,0x00,0x00,0x01,0x00,0x0d,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x46,0x00,0x00,0x00,
|
||||
0xf0,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x62,0x61,0x72,0x31,0x00,0x76,0x61,
|
||||
0x6c,0x75,0x65,0x00,0x34,0x30,0x00,0x00,0x00,0x01,0x00,0x0d,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0x00,
|
||||
0x00,0x46,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x62,0x61,
|
||||
0x72,0x32,0x00,0x76,0x61,0x6c,0x75,0x65,0x00,0x32,0x30,0x00,0x76,0x65,0x72,0x74,0x69,0x63,0x61,0x6c,
|
||||
0x00,0x74,0x72,0x75,0x65,0x00,0x00,0x00,0x01,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,
|
||||
0x6e,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x63,0x31,0x00,
|
||||
0x74,0x65,0x78,0x74,0x00,0x42,0x6f,0x6f,0x6b,0x00,0x00,0x00,0x01,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,
|
||||
0x64,0x00,0x00,0x00,0x6e,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,
|
||||
0x00,0x63,0x32,0x00,0x74,0x65,0x78,0x74,0x00,0x46,0x6f,0x6f,0x64,0x00,0x00,0x00,0x01,0x00,0x10,0x00,
|
||||
0x00,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,
|
||||
0x6e,0x61,0x6d,0x65,0x00,0x72,0x31,0x00,0x74,0x65,0x78,0x74,0x00,0x42,0x6f,0x6f,0x6b,0x00,0x00,0x00,
|
||||
0x01,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
|
||||
0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x72,0x32,0x00,0x74,0x65,0x78,0x74,0x00,0x46,0x6f,0x6f,
|
||||
0x64,0x00,0x00,0x00,0x01,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0xbe,0x00,0x00,0x00,0x96,0x00,0x00,0x00,
|
||||
0x50,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x72,0x33,0x00,0x74,0x65,0x78,0x74,
|
||||
0x00,0x50,0x65,0x6e,0x63,0x69,0x6c,0x00,0x76,0x61,0x6c,0x75,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x00,
|
||||
0x00,0x01,0x00,0x0a,0x00,0x00,0x00,0x01,0x00,0x0a,0x00,0x00,0x00,0xd2,0x00,0x00,0x00,0x28,0x00,0x00,
|
||||
0x00,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x64,0x69,0x61,0x6c,0x6f,0x67,0x31,0x00,0x74,0x65,
|
||||
0x78,0x74,0x00,0x44,0x69,0x61,0x6c,0x6f,0x67,0x31,0x00,0x00,0x00,0x01,0x00,0x0a,0x00,0x03,0x00,0x01,
|
||||
0x00,0x0a,0x00,0x00,0x00,0xd2,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,
|
||||
0x65,0x00,0x64,0x69,0x61,0x6c,0x6f,0x67,0x32,0x00,0x74,0x65,0x78,0x74,0x00,0x44,0x69,0x61,0x6c,0x6f,
|
||||
0x67,0x32,0x00,0x00,0x00,0x01,0x00,0x0a,0x00,0x00,0x00,0x01,0x00,0x0a,0x00,0x00,0x00,0xfa,0x00,0x00,
|
||||
0x00,0x28,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x77,0x69,0x6e,0x64,0x6f,0x77,
|
||||
0x31,0x00,0x74,0x65,0x78,0x74,0x00,0x57,0x69,0x6e,0x64,0x6f,0x77,0x31,0x00,0x00,0x00,0x01,0x00,0x0a,
|
||||
0x00,0x03,0x00,0x01,0x00,0x0a,0x00,0x00,0x00,0xfa,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x1e,0x00,0x00,
|
||||
0x00,0x6e,0x61,0x6d,0x65,0x00,0x77,0x69,0x6e,0x64,0x6f,0x77,0x32,0x00,0x74,0x65,0x78,0x74,0x00,0x57,
|
||||
0x69,0x6e,0x64,0x6f,0x77,0x32,0x00,0x00,0x00,0x01,0x00,0x0b,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0x00,
|
||||
0x00,0x68,0x01,0x00,0x00,0x64,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x69,0x6d,
|
||||
0x67,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x65,0x61,0x72,0x74,0x68,0x00,0x00,0x00,0x01,0x00,0x0b,0x00,
|
||||
0x00,0x00,0x00,0x00,0xc8,0x00,0x00,0x00,0x68,0x01,0x00,0x00,0x64,0x00,0x00,0x00,0x64,0x00,0x00,0x00,
|
||||
0x6e,0x61,0x6d,0x65,0x00,0x69,0x6d,0x67,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x72,0x67,0x62,0x00,0x00,
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,};/*926*/
|
||||
0x61,0x6d,0x65,0x00,0x6c,0x65,0x66,0x74,0x00,0x74,0x65,0x78,0x74,0x00,0x4c,0x65,0x66,0x74,0x00,0x00,
|
||||
0x00,0x01,0x00,0x09,0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x50,0x00,0x00,
|
||||
0x00,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x63,0x65,0x6e,0x74,0x65,0x72,0x00,0x74,0x65,0x78,
|
||||
0x74,0x00,0x43,0x65,0x6e,0x74,0x65,0x72,0x00,0x00,0x00,0x01,0x00,0x09,0x00,0x00,0x00,0x00,0x00,0xc8,
|
||||
0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,
|
||||
0x72,0x69,0x67,0x68,0x74,0x00,0x74,0x65,0x78,0x74,0x00,0x52,0x69,0x67,0x68,0x74,0x00,0x00,0x00,0x01,
|
||||
0x00,0x0d,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x46,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x1e,
|
||||
0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x62,0x61,0x72,0x31,0x00,0x76,0x61,0x6c,0x75,0x65,0x00,0x34,
|
||||
0x30,0x00,0x00,0x00,0x01,0x00,0x0d,0x00,0x00,0x00,0x00,0x00,0x18,0x01,0x00,0x00,0x46,0x00,0x00,0x00,
|
||||
0x1e,0x00,0x00,0x00,0x76,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x62,0x61,0x72,0x32,0x00,0x76,0x61,
|
||||
0x6c,0x75,0x65,0x00,0x32,0x30,0x00,0x76,0x65,0x72,0x74,0x69,0x63,0x61,0x6c,0x00,0x74,0x72,0x75,0x65,
|
||||
0x00,0x00,0x00,0x01,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x6e,0x00,0x00,0x00,0x50,
|
||||
0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x63,0x31,0x00,0x74,0x65,0x78,0x74,0x00,
|
||||
0x42,0x6f,0x6f,0x6b,0x00,0x00,0x00,0x01,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x6e,
|
||||
0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x63,0x32,0x00,0x74,
|
||||
0x65,0x78,0x74,0x00,0x46,0x6f,0x6f,0x64,0x00,0x00,0x00,0x01,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x0a,
|
||||
0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,
|
||||
0x72,0x31,0x00,0x74,0x65,0x78,0x74,0x00,0x42,0x6f,0x6f,0x6b,0x00,0x00,0x00,0x01,0x00,0x10,0x00,0x00,
|
||||
0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x6e,
|
||||
0x61,0x6d,0x65,0x00,0x72,0x32,0x00,0x74,0x65,0x78,0x74,0x00,0x46,0x6f,0x6f,0x64,0x00,0x00,0x00,0x01,
|
||||
0x00,0x10,0x00,0x00,0x00,0x00,0x00,0xbe,0x00,0x00,0x00,0x96,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x1e,
|
||||
0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x72,0x33,0x00,0x74,0x65,0x78,0x74,0x00,0x50,0x65,0x6e,0x63,
|
||||
0x69,0x6c,0x00,0x76,0x61,0x6c,0x75,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x00,0x00,0x01,0x00,0x0a,0x00,
|
||||
0x00,0x00,0x01,0x00,0x0a,0x00,0x00,0x00,0xd2,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,
|
||||
0x6e,0x61,0x6d,0x65,0x00,0x64,0x69,0x61,0x6c,0x6f,0x67,0x31,0x00,0x74,0x65,0x78,0x74,0x00,0x44,0x69,
|
||||
0x61,0x6c,0x6f,0x67,0x31,0x00,0x00,0x00,0x01,0x00,0x0a,0x00,0x03,0x00,0x01,0x00,0x0a,0x00,0x00,0x00,
|
||||
0xd2,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x64,0x69,0x61,
|
||||
0x6c,0x6f,0x67,0x32,0x00,0x74,0x65,0x78,0x74,0x00,0x44,0x69,0x61,0x6c,0x6f,0x67,0x32,0x00,0x00,0x00,
|
||||
0x01,0x00,0x0a,0x00,0x00,0x00,0x01,0x00,0x0a,0x00,0x00,0x00,0xfa,0x00,0x00,0x00,0x28,0x00,0x00,0x00,
|
||||
0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x77,0x69,0x6e,0x64,0x6f,0x77,0x31,0x00,0x74,0x65,0x78,
|
||||
0x74,0x00,0x57,0x69,0x6e,0x64,0x6f,0x77,0x31,0x00,0x00,0x00,0x01,0x00,0x0a,0x00,0x03,0x00,0x01,0x00,
|
||||
0x0a,0x00,0x00,0x00,0xfa,0x00,0x00,0x00,0x28,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,
|
||||
0x00,0x77,0x69,0x6e,0x64,0x6f,0x77,0x32,0x00,0x74,0x65,0x78,0x74,0x00,0x57,0x69,0x6e,0x64,0x6f,0x77,
|
||||
0x32,0x00,0x00,0x00,0x01,0x00,0x0b,0x00,0x00,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,0x68,0x01,0x00,0x00,
|
||||
0x64,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x69,0x6d,0x67,0x00,0x69,0x6d,0x61,
|
||||
0x67,0x65,0x00,0x65,0x61,0x72,0x74,0x68,0x00,0x00,0x00,0x01,0x00,0x0b,0x00,0x00,0x00,0x00,0x00,0xc8,
|
||||
0x00,0x00,0x00,0x68,0x01,0x00,0x00,0x64,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,
|
||||
0x69,0x6d,0x67,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x72,0x67,0x62,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,};/*941*/
|
||||
|
Binary file not shown.
@ -1,9 +1,10 @@
|
||||
<window name="main" x="0" y="0" w="320" h="480">
|
||||
<button name="inc" x="10" y="5" w="40%" h="30" text="Inc"/>
|
||||
<button name="dec" x="right:10" y="5" w="40%" h="30" text="Dec"/>
|
||||
<label name="" x="10" y="40" w="80" h="30" text="Left"/>
|
||||
<label name="" x="100" y="40" w="80" h="30" text="Center"/>
|
||||
<label name="" x="200" y="40" w="80" h="30" text="Right"/>
|
||||
<label name="left" x="10" y="40" w="80" h="30" text="Left"/>
|
||||
<label name="center" x="100" y="40" w="80" h="30" text="Center"/>
|
||||
<label name="right" x="200" y="40" w="80" h="30" text="Right"/>
|
||||
|
||||
<progress_bar name="bar1" x="10" y="70" w="240" h="30" value="40"/>
|
||||
<progress_bar name="bar2" x="280" y="70" w="30" h="118" value="20" vertical="true"/>
|
||||
<check_button name="c1" x="10" y="110" w="80" h="30" text="Book"/>
|
||||
|
@ -273,8 +273,8 @@ void* tk_realloc(void* ptr, uint32_t size) {
|
||||
}
|
||||
|
||||
#ifdef TK_MEM_SPEED_TEST
|
||||
static uint32_t s_memcpy_speed;
|
||||
static uint32_t s_memset_speed;
|
||||
uint32_t g_memcpy_speed;
|
||||
uint32_t g_memset_speed;
|
||||
static void tk_mem_speed_test(void* buffer, uint32_t length) {
|
||||
uint32_t i = 0;
|
||||
uint32_t cost = 0;
|
||||
@ -287,7 +287,7 @@ static void tk_mem_speed_test(void* buffer, uint32_t length) {
|
||||
}
|
||||
cost = time_now_ms() - start;
|
||||
if (cost) {
|
||||
s_memset_speed = (max_size * 1000) / (cost * 1024);
|
||||
g_memset_speed = (max_size * 1000) / (cost * 1024);
|
||||
}
|
||||
|
||||
start = time_now_ms();
|
||||
@ -298,10 +298,10 @@ static void tk_mem_speed_test(void* buffer, uint32_t length) {
|
||||
}
|
||||
cost = time_now_ms() - start;
|
||||
if (cost) {
|
||||
s_memcpy_speed = (max_size * 1000) / (cost * 1024);
|
||||
g_memcpy_speed = (max_size * 1000) / (cost * 1024);
|
||||
}
|
||||
|
||||
log_debug("s_memset_speed=%uK s_memcpy_speed=%uK cost=%ums", s_memset_speed, s_memcpy_speed,
|
||||
log_debug("g_memset_speed=%uK g_memcpy_speed=%uK cost=%ums", g_memset_speed, g_memcpy_speed,
|
||||
cost);
|
||||
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user