A metatable can be defined like
local t = setmetatable({}, {
__tostring = function() return 'custom tostring behavior!' end
})
Here are the metamethods that you can define, and their behavior
https://stackoverflow.com/questions/37063267/high-cpu-usage-with-android-emulator-qemu-system-i386-exe | |
The cause of the constant CPU usage is the sound. If you do not need sound in your emulator you can disable it by editing the AVD's config file. | |
Change/add those two lines | |
hw.audioInput=no | |
hw.audioOutput=no | |
On Linux/Mac the file is located at ~/.android/avd/<AVD_Name>.avd/config.ini | |
On Windows the file is located at C:\Users\<username>\.android\avd\<AVD_Name>.avd\config.ini |