My first project "PWM Fade" and my first Quesion

Hi There,
I just got my Adruino Board and started to play a little with it. I have some java skills whereas i never got in touch with C!

So now i started my first “project”:
I just want to fade an LED using PWM. I know that Port 9-11 can be used for that by taking the analogWrite() Methode, but i want to fade slower. With only 254 steps, slow fading looks quite jerky. So i built an PWM program which works finde, but the problem is to merge into a Fade.

I was wondering how to use “time” instead of mere operations and i remembered that there is a “millis” variable that might be useful…
So this is the code; which compiles but works without any visible result.

// LED Fade realized with PWM
#define LED 9
int STEPS = 1000;
int time = 10; //ms
void setup(){
  pinMode(LED, OUTPUT);

void loop(){
  for (int j = 0;j<=STEPS;j++){
    long millis_read = (long)millis;
    while ((long)millis-millis_read < time){
      for (int i=0;i<=STEPS;i++){
        if (i<j){
          digitalWrite(LED, HIGH);
          digitalWrite(LED, LOW);

Oh dear, i just found it.. I forgot the brackets millis() works fine ;)