You might want to take a look at these constants
private static final int BRIGHTNESS_RAMP_RATE_FAST = 200;
private static final int BRIGHTNESS_RAMP_RATE_SLOW = 40;
and how they're used in DisplayPowerController class which
Controls the power state of the display. Handles the proximity sensor, light sensor,
and animations between states including the screen off animation.
You might also want to take a look at rate
parameter of public boolean registerListener (SensorListener listener, int sensors, int rate)
as described here
The rate sensor events are delivered at. This is only a hint to the system.
Events may be received faster or slower than the specified rate.
Usually events are received faster. The value must be one of SENSOR_DELAY_NORMAL,
SENSOR_DELAY_UI, SENSOR_DELAY_GAME, or SENSOR_DELAY_FASTEST or, the desired delay
between events in microseconds.
Specifying the delay in microseconds only works from
Android 2.3 (API level 9) onwards. For earlier releases, you must use one of the
SENSOR_DELAY_* constants.